Linux commands that a Devops engineer uses on a regular basis

1) Hardware information command 💻

lcpu: see cpu information

lsblk: see information about block devices

2) File command💻

mkdir directory_name : create new directory

rm file_name: remove file

rm -r directory_name : remove directory recursively

rm -rf directory_name : recursively remove a directory without requiring a confirmation

cp source_file destination_file : copy the contents one file to another file

mv surce_file destination_file : move file or directory

touch file_name : create new file

cat file_name : show the content of file

head file_name : show the first ten lines of file

diff first_file seconde_file : compare two files and display differnce

[command] | tee file_name >> /tmp/ : store a command output in file

3) Users and Group commands💻

id : see details about the active users

sudo adduser username: create new user account

sudo passwd : change the current user's password

4) System information💻

uname -a : Display system information

df -h : Display disk space usage

free -m : Display free and usage memory