Show Menu
Cheatography

Devops Cheat Sheet (DRAFT) by

devops snippets devops snippets

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Linux

Copy files with directory structure
find /home/­use­rsdata/ -type f -user anita -exec cp --parents {} /media \;
Find files by user and count them
find /home/­use­rsdata -group anita | wc -l
Show service logs
journalctl -u postfi­x.s­ervice
Get list of service
systemctl --type­=se­rvice
Change the runlevel
sudo init 5 Change runlevel
Activate graohical mode
systemctl set-de­fault graphi­cal.target
Start graohical mode service
systemctl start graphi­cal.target
Create user with expery date
 sudo useradd -e 2021-12-07 ravi
ssh config
sudo vi /etc/s­sh/­ssh­d_c­onfig
Restart a service
sudo systemctl restart sshd
 

Kubernetes