Intro to Linux - caitlinmallen/TechWiki GitHub Wiki

Intro to Linux

File System Structure

  • Root directory
    • /boot, /usr, /etc, /home, /dev, /var
    • Under /usr would be:
      • /bin, /lib, /include
    • Under /home there would be:
      • /usernames and within them directories for the Desktop, Downloads, etc.

Basic Linux Commands

  • File & Folder
    • ls - List directory contents or file info
    • cd - Change current directory
    • mkdir - Make directory
    • rmdir - Delete directory
    • cp - Copy
    • rm - Remove
    • pwd - Print working directory
    • touch - Change timestamps or create empty files
    • cat - Display file contents
  • Compression
    • tar - Create an archive
  • File permission and ownership
    • chmod - Change permissions
    • chown - Change owner
  • Network
    • ping - Network test
    • whois - DNS information
    • ip - ifconfig basically
  • Process Management
    • ps - Process status viewer
    • top - CPU Information
  • System Information
    • date - Display system date and time
    • uptime - Find out how long system is active
    • whoami - Find out current user
  • Redirection Operators
    • | - Output serves as input to next in the pipeline
    • ">" - Overwrite a file
    • ">>" - Append a file
  • Superuser
    • sudo - Use sudoer privilege
    • su - Switch from one account to the other or to just root