Command-line Cheat-Sheet Ubuntu

Install Updates

sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)

Screen

screen -S "screenName"  # start a new session with screenName
$ screen -r "screenName"  # attach to running session with screenName
$ screen -ls              # list running sessions/screens

Control-a n # Switch to next Window
Control-a p # Switch to previous window
Control-a d # Detach from screen


Access USB flash drive from command line

  1. Find the name of the drive
    sudo fdisk -l


    Partition should look similar to: /dev/sdb1

  2. Create a mount point
    Make a new directory so you can mount the drive onto the filesystem:

    sudo mkdir /media/usb

  3. Mount the flash drive
    sudo mount /dev/sdb1 /media/usb


    When finished, disconnect USB flash drive

    sudo umount /media/usb