Linux VPS Commands Cheat Sheet 2026 — Copy-Paste Ready
Essential Linux VPS commands: ls -la (list files), htop (monitor CPU/RAM), df -h (disk usage), ufw status (firewall), systemctl status nginx (web server status), docker ps (running containers), pm2 list (Node.js processes). All work on Ubuntu 24.04 — the default OS on best VPS hosting India like GigaNodes.
Bookmark this page. Every command below is copy-paste ready and works on any Ubuntu VPS, including every GigaNodes VPS India plan.
1. Basic Navigation
ls # list files
ls -la # list all files with details
cd /path/to/dir # change directory
mkdir newfolder # create directory
rmdir emptyfolder # remove empty directory
2. File Management
mv file.txt newname.txt # move/rename file
rm -rf folder/ # delete folder and contents
chmod 755 script.sh # change permissions
chown user:group file.txt # change ownership
find / -name “*.log” # find files by name
grep “error” file.log # search text inside file
cat file.txt # print file contents
nano file.txt # edit file (beginner friendly)
vim file.txt # edit file (advanced)
3. Server Monitoring
top # classic process monitor
df -h # disk usage (human readable)
free -m # RAM usage in MB
du -sh folder/ # folder size
netstat -tulpn # open ports and listening services
ss -tulpn # modern alternative to netstat
uptime # server uptime and load average
iostat # disk I/O stats
vmstat # virtual memory stats
4. Process Management
kill [pid] # stop a process by ID
killall nginx # stop all processes by name
systemctl start nginx # start a service
systemctl stop nginx # stop a service
systemctl restart nginx # restart a service
systemctl status nginx # check service status
systemctl enable nginx # auto-start service on boot
journalctl -u nginx # view service logs
5. PM2 (Node.js Process Manager)
pm2 list # list running apps
pm2 stop myapp # stop an app
pm2 restart myapp # restart an app
pm2 logs myapp # view logs
pm2 monit # live monitoring dashboard
pm2 startup # enable auto-start on boot
pm2 save # save current process list
6. Firewall (UFW)
ufw status # check firewall status
ufw allow 22 # allow SSH
ufw allow 80,443/tcp # allow HTTP/HTTPS
ufw deny 8080 # block a port
ufw delete allow 8080 # remove a rule
ufw reset # reset all rules
7. Nginx
systemctl restart nginx # apply config changes
# Config location: /etc/nginx/sites-available/
# Logs location: /var/log/nginx/access.log and error.log
8. Docker
docker ps -a # all containers including stopped
docker images # list downloaded images
docker run -d image_name # run a container
docker stop container_id # stop a container
docker rm container_id # remove a container
docker logs container_id # view container logs
docker exec -it container_id bash # open shell inside container
docker compose up -d # start services from compose file
docker compose down # stop services from compose file
docker system prune # clean up unused images/containers
9. File Transfer
rsync -avz folder/ user@ip:/path/ # sync folders efficiently
wget https://example.com/file.zip # download a file
curl -O https://example.com/file.zip # download with curl
10. Logs
journalctl -f # live tail system logs
grep “error” /var/log/nginx/error.log # search for errors in logs
11. Cron Jobs
crontab -l # list scheduled tasks
# Cron syntax: * * * * * command
# | | | | |
# | | | | +– day of week (0-6)
# | | | +—- month (1-12)
# | | +—— day of month (1-31)
# | +——– hour (0-23)
# +———- minute (0-59)
AMD EPYC 7C13 · 141,108 IOPS (2.4x faster than DigitalOcean) · Cloudflare Magic Transit DDoS included free · UPI accepted · GST invoice · Yotta DC Noida · First Indian hosting company with Cloudflare Magic Transit · VPS from ₹400/mo →
Frequently Asked Questions
Related guides
Get the Best VPS Hosting in India
AMD EPYC 7C13 · Cloudflare Magic Transit · Yotta DC Noida · UPI accepted · GST invoice
⭐ 4.9/5 from 500+ reviews · No setup fee · Deploy in 60 seconds
