Linux Basics for Developers: Commands You Use Every Day

Learn the Linux commands every developer needs. File permissions, package management, process control, and server management covered clearly.

1991
Linux Created
96%
Server Market Share
600+
Commands Available
$150k+
Admin Salary

Key Takeaways

Whether you're deploying on AWS, running Docker containers, or writing Python scripts, you're almost certainly running on Linux. The cloud runs on Linux. AI training runs on Linux. Knowing how to navigate a Linux system isn't optional for any serious developer. This guide covers the fundamentals you'll use daily — not the history of Unix, just the commands and concepts that actually matter.

01

File Permissions: Who Can Do What

Every Linux file has three permission sets: owner, group, and others. Each set has three permissions: read (r=4), write (w=2), execute (x=1). ls -la shows permissions like -rwxr-xr--: first character is file type (- for file, d for directory), then owner/group/others permissions. Change permissions with chmod: chmod 755 script.sh (owner: rwx, group: r-x, others: r-x). Common values: 644 for regular files (owner can write, others read-only), 755 for executables and directories, 600 for private files (SSH keys). Change ownership: chown user:group file. sudo chown -R www-data:www-data /var/www recursively sets web server ownership.

02

Package Management: Installing and Updating Software

01

Learn the Core Concepts

Start with the fundamentals before touching tools. Understanding why something was built the way it was makes every tool decision faster and more defensible.

Concepts first, syntax second
02

Build Something Real

The fastest way to learn is to build a project that produces a real output — something you can show, share, or deploy. Toy examples teach you the happy path; real projects teach you everything else.

Ship something, then iterate
03

Know the Trade-offs

Every technology choice is a trade-off. The engineers who advance fastest are the ones who can articulate clearly why they chose one approach over another — not just "I used it before."

Explain the why, not just the what
04

Go to Production

Development is the easy part. The real learning happens when you deploy, monitor, debug, and scale. Plan for production from day one.

Dev is a warm-up, prod is the game

Different Linux distributions use different package managers. Ubuntu/Debian: apt. CentOS/RHEL: yum or dnf. macOS: brew (Homebrew). Essential apt commands: sudo apt update (refresh package index), sudo apt upgrade (upgrade all installed packages), sudo apt install package-name (install), sudo apt remove package-name (uninstall), apt search keyword (search available packages). For Python packages use pip install. For system-wide Python environment management, pyenv lets you switch between Python versions. Always use virtual environments (python -m venv venv) to isolate project dependencies.

03

System and Process Information

Understanding what your system is doing: top — interactive process viewer showing CPU/memory usage. htop — better version of top (install separately). df -h — disk usage by partition (human-readable). du -sh folder — size of a specific folder. free -h — RAM usage. uname -a — kernel and OS info. uptime — how long the system has been running and load averages. who — who is logged in. last — recent logins. For cloud servers, checking disk space and memory before running large jobs is a habit that prevents many frustrating out-of-memory crashes mid-training-run.

04

Services and Systemd: Managing Long-Running Processes

Modern Linux uses systemd to manage services (web servers, databases, custom applications). Essential commands: sudo systemctl start service, sudo systemctl stop service, sudo systemctl restart service, sudo systemctl status service (shows if running and recent logs), sudo systemctl enable service (start on boot), sudo systemctl disable service. Check logs: journalctl -u service-name -f (follow logs in real time), journalctl -u service-name --since '1 hour ago'. Running your own Python app as a service is straightforward — create a .service file in /etc/systemd/system/ defining ExecStart and restart behavior.

05

Cron Jobs: Schedule Automated Tasks

Cron schedules commands to run automatically. Edit crontab: crontab -e. Crontab syntax: minute hour day month weekday command. Examples:

# Run at midnight every day
0 0 * * * /usr/bin/python3 /home/user/backup.py

# Run every 5 minutes
*/5 * * * * /home/user/check_status.sh

# Run at 9 AM every weekday
0 9 * * 1-5 /home/user/reports.py

# Log output
0 0 * * * /home/user/job.sh >> /var/log/job.log 2>&1

Use crontab.guru to verify cron expressions visually before deploying. Always use absolute paths in cron jobs — the environment is minimal and relative paths fail.

06

Environment Variables and Configuration

Environment variables store configuration that programs read at runtime. View all: env or printenv. Set temporarily: export API_KEY='abc123' (lasts for the session). Set permanently: add the export line to ~/.bashrc or ~/.zshrc, then source ~/.bashrc to reload. In Python: import os; key = os.getenv('API_KEY'). For production servers, never hardcode secrets in code or config files. Use environment variables, or a secrets manager like AWS Secrets Manager or HashiCorp Vault. The .env file pattern (with python-dotenv) is common for development — add .env to .gitignore immediately.

07

Frequently Asked Questions

Do I need to learn Linux if I use macOS?
macOS is Unix-based, so most Linux commands work on macOS. But cloud servers, Docker containers, and CI/CD systems run Linux, so knowing Linux-specific tools like apt, systemctl, and Linux filesystem conventions is important for real-world development.
What Linux distribution should a developer use?
Ubuntu LTS (Long Term Support) is the most widely used for servers and is beginner-friendly. For local development on non-macOS, Ubuntu Desktop or Fedora are solid choices. The distribution matters less than learning the core commands — they transfer across distributions.
Is Linux required for AI and machine learning work?
Effectively yes for serious work. GPU training typically runs on Linux servers. Cloud ML instances run Linux. Docker containers are Linux-based. Even if you develop locally on macOS or Windows, you'll interact with Linux servers constantly.
How do I connect to a Linux server?
SSH (Secure Shell) is the standard: ssh user@server-ip. You'll need either a password or an SSH key pair. Generate a key pair with ssh-keygen, then add your public key (~/.ssh/id_rsa.pub) to the server's ~/.ssh/authorized_keys file for passwordless login.

Ready to Level Up Your Skills?

Linux, Python, cloud tools, and AI development — covered in depth at our 3-day hands-on bootcamp. 400+ professionals trained. Next cohorts June–October 2026 in Denver, NYC, Dallas, LA, and Chicago. Only $1,490.

View Bootcamp Details
The Verdict
Master this topic and you have a real production skill. The best way to lock it in is hands-on practice with real tools and real feedback — exactly what we build at Precision AI Academy.

Stop reading. Start building.

The 2-day in-person Precision AI Academy bootcamp. 5 cities. $1,490. 40 seats max. June–October 2026 (Thu–Fri).

Reserve Your Seat
PA
Our Take

Linux comfort is the clearest visible signal that separates junior from mid-level developers.

Experienced developers can identify a junior developer in a code review or pair programming session quickly, and one of the clearest signals is fluency — or the lack of it — at the command line. A developer who reaches for a GUI file manager when SSHed into a server, who does not know how to read a log file without a log viewer, or who cannot perform basic file permission changes without looking up the syntax every time is telegraphing their experience level in ways that go beyond the specific skills involved. The command line is where the work happens in production, and comfort with it is a proxy for how much real production experience someone has accumulated.

The specific Linux basics that pay back most quickly for developers: understanding file permissions and ownership (the difference between 644, 755, and 700 matters constantly), process management (how to find what is using a port, how to kill a stuck process, how to check if a service is running), pipes and redirection (chaining commands together without intermediate files), and ssh config and key management. These are not deep topics — each is learnable in an afternoon — but collectively they change the experience of working with any server-based environment from frustrating to functional.

The fastest way to build Linux fluency is not a course but a personal server. A $5/month DigitalOcean Droplet or Linode that you use to host a personal project forces you to solve real problems in a Linux environment. The lessons stick because they were learned under pressure, not under a tutorial.

PA

Published By

Precision AI Academy

Practitioner-focused AI education · 2-day in-person bootcamp in 5 U.S. cities

Precision AI Academy publishes deep-dives on applied AI engineering for working professionals. Founded by Bo Peng (Kaggle Top 200) who leads the in-person bootcamp in Denver, NYC, Dallas, LA, and Chicago.

Kaggle Top 200 Federal AI Practitioner 5 U.S. Cities Thu–Fri Cohorts