Menu

Saturday, 25 October 2025

๐Ÿ’ป Top 100+ Linux Commands for Middleware & DevOps Engineers ⚙️

๐Ÿ’ป Top 100 Linux Commands for Middleware & DevOps Engineers ⚙️ (Includes SSH, SSH-Key & Telnet) | MiddlewareBox
  • ๐Ÿ’ป Linux is the backbone of every Middleware and DevOps ecosystem — running enterprise tools like WebSphere, JBoss, Jenkins, Docker, and Ansible.
  • ⚙️ This post brings together 100+ essential Linux commands — covering file management, networking, SSH, cron jobs, and systemctl operations used daily by engineers.
  • ๐Ÿ” Learn secure connectivity practices with SSH and SSH-Key management, plus essential testing using Telnet.
  • ๐Ÿš€ Ideal for Middleware Engineers, DevOps professionals, and System Administrators aiming to strengthen their Linux command-line mastery.


๐Ÿ“ 1️⃣ File & Directory Management

๐Ÿงฉ Command ๐Ÿ’ก Description
pwdShow current directory
ls -lhList files in readable format
ls -lrtSort files by modification time
cd /opt/appChange directory
mkdir -p /data/logs/archiveCreate nested directories
rm -rf /tmp/logsRemove directory recursively
cp -rp /opt/config /backup/Copy files with permissions
mv old.log new.logRename or move file
cat file.txtDisplay file content
du -sh /optShow directory size
df -hDisplay filesystem usage
touch file.txtCreate an empty file

๐Ÿ” Command ๐Ÿ’ก Description
grep "error" logfile.logSearch keyword in file
grep -i "critical" /var/log/syslogCase-insensitive search
grep -r "Exception" /opt/app/Recursive search
awk '{print $1,$3}' logfile.logPrint specific columns
sort -u file.txtSort and remove duplicates
uniq -c file.txtCount unique lines
wc -l file.txtCount number of lines
head -n 10 file.txtShow first 10 lines
tail -n 50 logfile.logShow last 50 lines
tail -f jenkins.logWatch logs live
sed -i 's/http:/https:/g' nginx.confReplace text in file

⚙️ 3️⃣ Process & Performance Monitoring

⚙️ Command ๐Ÿ’ก Description
topReal-time process viewer
htopInteractive process viewer
ps -ef | grep javaShow running Java processes
kill -9 <pid>Kill process by ID
lsof -i :8080Find process using a port
vmstat 2 5Show CPU/memory stats every 2s
iostat -x 1Disk performance summary
free -mMemory usage (in MB)
uptimeSystem load average
sar -u 2 3CPU utilization snapshot
journalctl -u nginx.service -fFollow logs for systemd service
dmesg | tail -20Check kernel/system logs

๐ŸŒ 4️⃣ Network & Connectivity

๐ŸŒ Command ๐Ÿ’ก Description
ping www.google.comCheck connectivity
curl -I https://middlewarebox.comGet HTTP headers
wget https://example.com/file.zipDownload file
ip addrDisplay IP addresses
ip routeShow routing table
ss -tulwnShow listening ports
netstat -plantDisplay active connections
nc -zv 10.0.0.5 22Test port access
traceroute 8.8.8.8Trace route to host
nslookup middlewarebox.comDNS lookup
dig middlewarebox.comDetailed DNS query

๐Ÿ”‘ 5️⃣ SSH & Secure Connectivity Commands

๐Ÿ”‘ Command ๐Ÿ’ก Description
ssh user@hostnameConnect to remote server
ssh -i ~/.ssh/id_rsa user@10.0.0.10Use specific private key
ssh-copy-id user@serverCopy SSH key for passwordless login
ssh -v user@serverVerbose SSH connection (debug)
scp file.txt user@remote:/tmp/Securely copy files between systems
rsync -avz /opt/app/ user@server:/backup/Sync files securely over SSH
ssh-agent bashStart SSH authentication agent
ssh-add ~/.ssh/id_rsaAdd SSH private key to agent

๐Ÿ” 6️⃣ SSH-Key Management (Essential for DevOps)

๐Ÿ” Command ๐Ÿ’ก Description
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"Generate a new SSH key pair
ls ~/.ssh/List existing SSH keys and configs
cat ~/.ssh/id_rsa.pubView your public key
ssh-copy-id user@serverCopy public key for passwordless login
ssh -i ~/.ssh/id_rsa user@serverConnect using a private key
chmod 700 ~/.sshSecure SSH directory
chmod 600 ~/.ssh/id_rsa & chmod 644 ~/.ssh/id_rsa.pubSet correct key permissions
ssh -T git@github.comTest SSH auth with GitHub
ssh-agent bash & ssh-add ~/.ssh/id_rsaLoad key into SSH agent

๐Ÿ’ก TIP: SSH keys allow secure, passwordless access between servers — commonly used in Jenkins, Ansible, and Git integrations for DevOps automation.


๐ŸŒ 7️⃣ Telnet Commands (Essential)

๐ŸŒ Command ๐Ÿ’ก Description
telnet hostname portTest basic TCP connectivity
telnet 10.0.0.10 443Check HTTPS port reachability
telnet mail.server.com 25Test SMTP mail server connection

⚙️ 8️⃣ User & Permission Management

๐Ÿ‘ค Command ๐Ÿ’ก Description
whoamiShow current user
idDisplay user ID and groups
adduser devopsCreate a new user
passwd devopsSet user password
usermod -aG sudo devopsAdd user to sudo group
groups devopsShow user group memberships
chmod +x deploy.shMake script executable
chown root:root /opt/appChange file ownership

๐Ÿ“ฆ 9️⃣ Compression & Archiving

๐Ÿ“ฆ Command ๐Ÿ’ก Description
tar -cvf backup.tar /dataCreate tar archive
tar -xvf backup.tarExtract tar file
gzip file.txtCompress file
gunzip file.txt.gzDecompress file
zip -r backup.zip /opt/appCreate zip archive
unzip backup.zipExtract zip archive

๐Ÿ› ️ 1️⃣0️⃣ System & Service Management

๐Ÿ› ️ Command ๐Ÿ’ก Description
systemctl status firewalldCheck firewalld service status
systemctl start firewalldStart firewalld service
systemctl stop firewalldStop firewalld service
systemctl enable firewalldEnable firewalld at boot
systemctl disable firewalldDisable firewalld from starting at boot

๐Ÿ“ฆ 1️⃣1️⃣ Package Management

๐Ÿ“ฆ Command ๐Ÿ’ก Description
apt updateUpdate package lists (Debian/Ubuntu)
apt install <package>Install package (Debian/Ubuntu)
yum updateUpdate packages (RHEL/CentOS)
yum install telnet / apt install telnetInstall Telnet client on RHEL / Ubuntu

⏰ 1️⃣2️⃣ Cron & Scheduling (Small but essential)

⏰ Command ๐Ÿ’ก Description
crontab -lList current user's cron jobs
crontab -eEdit current user's cron jobs using the default editor
sudo crontab -e -u usernameEdit another user's cron jobs (requires sudo)
cat /etc/crontabView system-wide cron file

๐Ÿง  ๐Ÿ”Ÿ Productivity & Shortcuts

⚡ Command ๐Ÿ’ก Description
historyShow previous commands
!!Re-run last command
!sudoRun last command as sudo
alias ll='ls -la'Create command alias
unalias llRemove alias
ctrl + rSearch command history
clearClear terminal screen

No comments:

Post a Comment