🔧 1. Basic Commands Command Description pwd
Print current directory ls
List files and directories cd [dir]
Change directory mkdir [dir]
Create a directory touch [file]
Create an empty file rm [file/dir]
Delete file or directory (-r
for recursive) cp [src] [dst]
Copy file/directory mv [src] [dst]
Move or rename file cat [file]
Display file contents nano
, vim
, vi
Text editors
🔎 2. File Permissions Symbol Meaning r
Read w
Write x
Execute
bashCopyEditchmod 755 file # Set read/write/execute for owner, read/execute for group/others
chown user:group file # Change owner and group
ls -l # Show detailed list with permissions
📁 3. File System Structure Directory Description /
Root directory /home
User home directories /etc
Configuration files /var
Log files, spool files /bin
Essential user binaries /sbin
System binaries /usr
User applications and utilities /tmp
Temporary files
🛠️ 4. Package Management Debian/Ubuntu: bashCopyEditsudo apt update
sudo apt install [package]
sudo apt remove [package]
RHEL/CentOS: bashCopyEditsudo yum install [package]
sudo yum remove [package]
🔄 5. Process Management Command Description ps aux
List running processes top
or htop
Live process monitoring kill [PID]
Terminate a process kill -9 [PID]
Force terminate &
Run process in background fg
, bg
Foreground/background a job
🌐 6. Networking Commands Command Description ifconfig
or ip a
Show IP addresses ping [host]
Check connectivity netstat -tuln
List open ports curl [url]
Fetch URL content scp [src] [user@host]:[dst]
Secure file copy ssh user@host
Secure shell login