Linux Quick Intro

A lightweight, responsive, cross-browser static page with practical Linux command examples.

Contents

What is Linux? Filesystem Basics Processes Networking Permissions Packages Tips

What is Linux?

Linux is a family of open-source operating systems built around the Linux kernel. It powers servers, cloud infrastructure, embedded devices, and developer workstations.

Most Linux systems are used through a shell (terminal). Common shells include bash and zsh.

Filesystem Basics

Learn to navigate and inspect files and directories:

# Where am I?
pwd

# List files (long format + human readable sizes)
ls -lah

# Change directory
cd /var/log

# View a file (pager)
less syslog

# Search text in files
grep -R "error" .

Processes

Check resource usage and manage running programs:

# Interactive process viewer (if installed)
top

# Better interactive viewer (often available)
htop

# Find a process by name
ps aux | grep nginx

# Gracefully stop a process by PID
kill -TERM 1234

# Force kill (use carefully)
kill -KILL 1234

Networking

Inspect IP addresses, routes, and connectivity:

# Show IP addresses
ip a

# Show routes
ip r

# Test connectivity
ping -c 4 1.1.1.1

# DNS lookup
nslookup example.com

# Check listening ports
ss -lntp

Permissions

Linux permissions control read/write/execute access:

# Check permissions
ls -l

# Make a script executable
chmod +x script.sh

# Change ownership (requires privileges)
sudo chown user:group file.txt

# Run a command as admin (when permitted)
sudo systemctl status ssh

Tip: Ctrl + C stops a running command, Ctrl + D exits the shell session.

Packages

Different distros use different package managers:

# Debian / Ubuntu
sudo apt update
sudo apt install curl

# RHEL / CentOS / Fedora (dnf on newer systems)
sudo dnf install curl

# Arch
sudo pacman -S curl

Practical Tips

  • Use man pages: man ls, man grep
  • Chain commands: cmd1 && cmd2 (run cmd2 only if cmd1 succeeds)
  • Redirect output: command > out.txt, append with >>
  • Use pipes: journalctl | grep ssh

Start with the basics