Linux Commands
- Get link
- X
- Other Apps
🚀 Linux Commands Every Cloud / DevOps / SRE Must Master
📁 File & Directory (daily bread-and-butter)
pwd # show current directory
ls -lah # list files with size + permissions
tree # folder structure view
cd # change directory
mkdir # create directory
rm -rf # delete files/folders
cp -r # copy files/folders
mv # move/rename
find / -name # search files
locate file # fast file search
du -sh * # folder sizes
df -h # disk usage
📄 File Viewing & Editing (logs debugging gold)
cat file # print file
less file # scroll safely
head -n 20 # first lines
tail -f log # live logs (VERY important)
vim / nano # edit files
wc -l # count lines
🔎 Text Processing (real DevOps superpower)
grep "error" # search text
grep -ri # recursive search
awk '{print $1}' # column parsing
sed 's/a/b/g' # replace text
sort # sort output
uniq # remove duplicates
cut -d: -f1 # extract columns
tr a-z A-Z # transform chars
👉 These are used DAILY for:
logs
metrics
troubleshooting
automation
⚙️ Processes & System (production debugging core)
ps aux # running processes
top # live usage
htop # better top
kill -9 PID # kill process
pkill name # kill by name
bg / fg # background/foreground
jobs # running jobs
uptime # server load
free -h # memory
💾 Disk & Storage (SRE lifesaver)
lsblk # disks
mount # mounted FS
umount # unmount
df -h # space
du -sh # folder size
iostat # disk I/O
🌐 Networking (MOST ASKED IN INTERVIEWS)
ip a # IP address
ss -tulnp # open ports
netstat -tulnp # ports (old but common)
ping # connectivity
curl # API calls
wget # download
traceroute # network path
nslookup # DNS check
dig # DNS details
👉 These are used in:
Kubernetes
Load balancers
API debugging
Cloud issues
👤 Users & Permissions (security basics)
whoami # current user
id # user info
chmod # change perms
chown # change owner
useradd # add user
passwd # set password
su / sudo # switch user
🔧 Services & Logs (DevOps core)
systemctl status nginx # service status
systemctl start/stop # control service
journalctl -u nginx # service logs
journalctl -f # live logs
📦 Package Management
Ubuntu/Debian
apt install apt update apt remove
RHEL/CentOS
yum install dnf install
🔥 Power Commands (makes you 10x engineer)
history # past commands
watch -n 2 cmd # run repeatedly
crontab -e # schedule jobs
xargs # pass output as args
nohup cmd & # run in background
time cmd # execution time- Get link
- X
- Other Apps
Comments
Post a Comment