๐ป 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
pwd Show current directory
ls -lh List files in readable format
ls -lrt Sort files by modification time
cd /opt/app Change directory
mkdir -p /data/logs/archive Create nested directories
rm -rf /tmp/logs Remove directory recursively
cp -rp /opt/config /backup/ Copy files with permissions
mv old.log new.log Rename or move file
cat file.txt Display file content
du -sh /opt Show directory size
df -h Display filesystem usage
touch file.txt Create an empty file
๐งพ 2️⃣ Search & Text Processing
๐ Command
๐ก Description
grep "error" logfile.log Search keyword in file
grep -i "critical" /var/log/syslog Case-insensitive search
grep -r "Exception" /opt/app/ Recursive search
awk '{print $1,$3}' logfile.log Print specific columns
sort -u file.txt Sort and remove duplicates
uniq -c file.txt Count unique lines
wc -l file.txt Count number of lines
head -n 10 file.txt Show first 10 lines
tail -n 50 logfile.log Show last 50 lines
tail -f jenkins.log Watch logs live
sed -i 's/http:/https:/g' nginx.conf Replace text in file
⚙️ 3️⃣ Process & Performance Monitoring
⚙️ Command
๐ก Description
top Real-time process viewer
htop Interactive process viewer
ps -ef | grep java Show running Java processes
kill -9 <pid> Kill process by ID
lsof -i :8080 Find process using a port
vmstat 2 5 Show CPU/memory stats every 2s
iostat -x 1 Disk performance summary
free -m Memory usage (in MB)
uptime System load average
sar -u 2 3 CPU utilization snapshot
journalctl -u nginx.service -f Follow logs for systemd service
dmesg | tail -20 Check kernel/system logs
๐ 4️⃣ Network & Connectivity
๐ Command
๐ก Description
ping www.google.com Check connectivity
curl -I https://middlewarebox.com Get HTTP headers
wget https://example.com/file.zip Download file
ip addr Display IP addresses
ip route Show routing table
ss -tulwn Show listening ports
netstat -plant Display active connections
nc -zv 10.0.0.5 22 Test port access
traceroute 8.8.8.8 Trace route to host
nslookup middlewarebox.com DNS lookup
dig middlewarebox.com Detailed DNS query
๐ 5️⃣ SSH & Secure Connectivity Commands
๐ Command
๐ก Description
ssh user@hostname Connect to remote server
ssh -i ~/.ssh/id_rsa user@10.0.0.10 Use specific private key
ssh-copy-id user@server Copy SSH key for passwordless login
ssh -v user@server Verbose 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 bash Start SSH authentication agent
ssh-add ~/.ssh/id_rsa Add 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.pub View your public key
ssh-copy-id user@server Copy public key for passwordless login
ssh -i ~/.ssh/id_rsa user@server Connect using a private key
chmod 700 ~/.ssh Secure SSH directory
chmod 600 ~/.ssh/id_rsa & chmod 644 ~/.ssh/id_rsa.pub Set correct key permissions
ssh -T git@github.com Test SSH auth with GitHub
ssh-agent bash & ssh-add ~/.ssh/id_rsa Load 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 port Test basic TCP connectivity
telnet 10.0.0.10 443 Check HTTPS port reachability
telnet mail.server.com 25 Test SMTP mail server connection
⚙️ 8️⃣ User & Permission Management
๐ค Command
๐ก Description
whoami Show current user
id Display user ID and groups
adduser devops Create a new user
passwd devops Set user password
usermod -aG sudo devops Add user to sudo group
groups devops Show user group memberships
chmod +x deploy.sh Make script executable
chown root:root /opt/app Change file ownership
๐ฆ 9️⃣ Compression & Archiving
๐ฆ Command
๐ก Description
tar -cvf backup.tar /data Create tar archive
tar -xvf backup.tar Extract tar file
gzip file.txt Compress file
gunzip file.txt.gz Decompress file
zip -r backup.zip /opt/app Create zip archive
unzip backup.zip Extract zip archive
๐ ️ 1️⃣0️⃣ System & Service Management
๐ ️ Command
๐ก Description
systemctl status firewalld Check firewalld service status
systemctl start firewalld Start firewalld service
systemctl stop firewalld Stop firewalld service
systemctl enable firewalld Enable firewalld at boot
systemctl disable firewalld Disable firewalld from starting at boot
๐ฆ 1️⃣1️⃣ Package Management
๐ฆ Command
๐ก Description
apt update Update package lists (Debian/Ubuntu)
apt install <package> Install package (Debian/Ubuntu)
yum update Update packages (RHEL/CentOS)
yum install telnet / apt install telnet Install Telnet client on RHEL / Ubuntu
⏰ 1️⃣2️⃣ Cron & Scheduling (Small but essential)
⏰ Command
๐ก Description
crontab -l List current user's cron jobs
crontab -e Edit current user's cron jobs using the default editor
sudo crontab -e -u username Edit another user's cron jobs (requires sudo)
cat /etc/crontab View system-wide cron file
๐ง ๐ Productivity & Shortcuts
⚡ Command
๐ก Description
history Show previous commands
!! Re-run last command
!sudo Run last command as sudo
alias ll='ls -la' Create command alias
unalias ll Remove alias
ctrl + r Search command history
clear Clear terminal screen
No comments:
Post a Comment