Linux Guide

From Tux
Revision as of 18:35, 31 January 2019 by Sam (talk | contribs)
Jump to: navigation, search

Introduction

List of popular Linux operating systems

  • Ubuntu - Common OS for personal use.
  • CentOS - Another common OS for personal use. CentOS is available in the TBE B-461 lab.
  • Debian - Yet another common Linux OS.
  • Raspbian - OS commonly used on Raspberry Pis for simple projects.
  • Android - The popular phone OS. May require a separate emulator.

Linux commands

List of common commands

For the sake of brevity and making things easier to find, we will not be going over every single command available in Linux here, but rather, a list of some of the more common and useful commands. For a list of all Linux commands, you can follow this link

The command examples are formatted like:

  • command_name Description
Examples Description of example
    • command_name <parameter>
      • command_name -option

Bash

Bash is a shell for navigating an OS without the need for GUI. Bash is a part of the GNU Project, aiming to provide "free" software to aid in computing. Bash is available on most Linux distributions, as well as OSX (Mac) upon installing the OS. For more information, please see the embedded links provided above.

File and Directory

SSH

Grep

Sending emails

Running programs and scripts

Changing permissions

Running scripts

Miscellaneous

  • apt Advanced Package Management tool for Debian-based operating systems.
  • apt-get Advanced packaged tool get. Use this for installing packages.
    • apt-get install The option install will install the downloaded package.
apt-get install python3-pip Will install the pip package installer for Python3.
sudo apt-get install mysql-server Will download install the package mysql-server. (We'll cover sudo later)
    • apt-get update Re-synchronizes package index files from their source. Do this before doing upgrade.
sudo apt-get update
    • apt-get upgrade Upgrades existing packages, if there are newer versions to be installed.
sudo apt-get upgrade
    • apt-get remove
    • apt-get purge
      • apt-get -d Download the package, but don't install it.
      • apt-get -f Attempts to fix broken packages.
      • apt-get --force-yes Automatically chooses "yes" during installation.
      • apt-get -h Provides help for using apt-get
      • apt-get -m Ignore missing files
      • apt-get --reinstall Reinstalls packages that are up to date.
      • apt-get -v Shows the current version
  • sudo Super User DO. Execute the following command with "super user" privileges. Similar to administrator privileges in Windows.

Installing programs

Running Linux (Ubuntu) on a virtual machine

We have a tutorial for installing a running Ubuntu on the VirtualBox page. You should do this if you need to use Linux, but don't want to install it on your actual machine.