This website presents a newbie-friendly tutorial and quick reference for the Linux command line. If you like the site, please consider buying the book. Have fun!

Table of Contents

1. A Short Intro to the Command Line

2. Getting Information

  • apropos(find a command)
  • df (report free disk space)
  • du (show disk space usage of files)
  • fdisk (list and edit disk partitions)
  • file (determine file type)
  • free (display free working memory)
  • ls (list directory contents)
  • lscpu, lspci, lsusb (list hardware)
  • man (view reference manuals)
  • uname (get kernel info)
  • stat (display file status)
  • top (watch system resource usage)
  • tree (show directory tree)
  • which (locate a command)

3. Managing Files and Directories

  • cd (change directory)
  • chgrp (change group ownership)
  • chmod (change file permissions)
  • chown (change file ownership)
  • cp (copy files and directories)
  • dd (write data to devices)
  • find (search for files)
  • ln (make links between files)
  • locate (find files by name)
  • mkdir (create a directory)
  • mount (mount file systems)
  • mv (rename files)
  • rm (remove files or directories)
  • rmdir (remove empty directories)
  • shred (delete a file securely)
  • touch (change file timestamps)
  • umount (unmount file systems)

4. Managing Processes

  • disown (detach a job from the shell)
  • kill (terminate a process)
  • ps (list running processes)
  • pstree (display a tree of processes)
  • shutdown (halt or reboot the system)
  • sudo (execute a command as root)

5. Working with Text

  • cat (concatenate and output files)
  • cut (output columns from files)
  • diff (show differences between files)
  • grep (print lines matching a pattern)
  • head (output the first part of files)
  • less (view file by pages)
  • pdftk (manipulate PDF files)
  • sed (search and replace text)
  • sort (sort lines of text files)
  • tail (output the last part of files)
  • wc (count lines, words and characters)

6. Being Productive

  • alias (define command shortcuts)
  • alsamixer (audio mixer)
  • bc (command line calculator)
  • history (display command history)
  • rsync (fast, versatile file copying tool)
  • tar (Linux archiving utility)
  • unrar (extract files from RAR archives)
  • unzip (extract files from ZIP archives)
  • wget (tool for downloading files)
  • xmodmap (change key bindings)