Linux VPS Commands Cheat Sheet 2026 — Copy-Paste Ready
Back to Blog
Linux Tutorials

Linux VPS Commands Cheat Sheet 2026 — Copy-Paste Ready

Mayank SharmaMayank Sharma
June 23, 20267 min read
GigaNodes

Blog

VPS Hosting India
VPS Hosting India · June 2026

Linux VPS Commands Cheat Sheet 2026 — Copy-Paste Ready

Mayank Sharma·June 2026·11 min read
Direct answer

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

pwd # print working directory
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

cp file.txt /backup/ # copy file
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

htop # interactive CPU/RAM monitor
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

ps aux # list all running processes
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 start app.js –name myapp # start an app
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 enable # turn on firewall
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

nginx -t # test config for errors
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 # running containers
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

scp file.txt user@ip:/path/ # copy file to remote server
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

tail -f /var/log/nginx/access.log # live tail a log file
journalctl -f # live tail system logs
grep “error” /var/log/nginx/error.log # search for errors in logs

11. Cron Jobs

crontab -e # edit scheduled tasks
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)

Why GigaNodes for VPS India

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

What are the most important Linux commands for VPS beginners in India?
Start with these: ls -la (list files), cd (navigate), htop (monitor resources), df -h (check disk), ufw (firewall), systemctl (manage services), and docker (containers). All work on Ubuntu 24.04 which comes pre-installed on GigaNodes VPS India from ₹400/mo.
How do I monitor CPU and RAM usage on VPS India?
Run htop for real-time CPU and RAM monitoring. Run free -m for quick RAM check. Run df -h for disk usage. On GigaNodes VPS India all these work out of the box on Ubuntu 24.04.
How do I restart Nginx on Ubuntu VPS?
Run sudo systemctl restart nginx. Test config first with nginx -t. Logs are at /var/log/nginx/error.log. Works the same on all GigaNodes VPS India plans running Ubuntu 24.04.
What is the best VPS for learning Linux in India?
GigaNodes Cloud Nano (₹400/mo) is ideal for learning Linux — full root access on Ubuntu 24.04, AMD EPYC 7C13, Cloudflare Magic Transit DDoS, UPI payment, GST invoice. Start cheap and upgrade anytime.

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

Share this article
Mayank Sharma

Written by

Mayank Sharma

Part of the GigaNodes team, bringing you insights on game hosting and cloud infrastructure.