Guides/Server Setup
Server Setup8 min read

Linux Command Line Basics Every Developer Needs

The essential Linux commands for developers — navigating files, permissions, processes, logs, networking, and text manipulation. A practical reference, not a textbook.

File Navigation and Management

pwd — print current directory. ls -la — list files with permissions and hidden files. cd /path — change directory. cd ~ — go to home directory. cd - — go back to previous directory. mkdir -p dir/subdir — create nested directories. cp -r src dest — copy recursively. mv file newname — move or rename. rm -rf dir — delete directory (use with care). ln -s /real/path /link/name — create a symlink.

File Viewing and Searching

cat file — print file contents. less file — scroll through large files (q to quit). head -n 20 file — first 20 lines. tail -n 50 file — last 50 lines. tail -f logfile — follow a log in real time. grep "error" file — find lines containing "error". grep -r "TODO" src/ — recursive search. grep -i "Error" — case-insensitive. find /var/log -name "*.log" -mtime -1 — find log files modified in last 24 hours.

Permissions and Ownership

ls -la shows permissions as rwxrwxrwx (owner/group/other). chmod 755 file — owner can read/write/execute, others can read/execute. chmod 644 file — owner read/write, others read only. chmod +x script.sh — make executable. chown ubuntu:ubuntu file — change owner and group. sudo chown -R ubuntu:ubuntu /path — recursively change ownership. Incorrect permissions cause "Permission denied" errors — check with ls -la first.

Process Management

ps aux — list all processes. ps aux | grep nginx — find nginx processes. kill 1234 — send TERM signal to process 1234. kill -9 1234 — force kill (last resort). killall nginx — kill all processes named nginx. top — interactive process monitor (q to quit). htop — better top (install with apt install htop). lsof -i :3000 — find what process is using port 3000. nohup command & — run command in background that survives logout.

Networking Commands

curl -I https://yoursite.com — show HTTP headers. curl -o /dev/null -w "%{http_code}" https://yoursite.com — check HTTP status code. wget https://url/file — download a file. ss -tlnp — show listening TCP ports with process names. netstat -tlnp — older alternative to ss. ping google.com — test connectivity. traceroute google.com — trace the network path. dig yoursite.com — DNS lookup. nslookup yoursite.com — alternative DNS lookup.

Need Help?

Want this done for you?

Our engineering team handles implementations like this every week. Get a free scoping call — we will tell you exactly what it takes and what it costs.

Book a free call

© 2026 NexWorldTech — Built for Global Dominance.