One Hour Intro to Linux

This is a quick intro to Linux that can be given to a user in one hour during a regular volunteer session. Will cover everything someone needs to be a basic user.

What is Linux?
It's free!

It's open source!

It's everywhere!

What is Xubuntu?
Xubuntu is the distro of Linux that we have chosen as our standard. It's a fork of Ubuntu, which is a very popular distro that was designed as a user-friendly desktop.

Xubuntu is just Ubuntu with the XFCE desktop. Unlike popular commercial operating systems, you have many choices for different desktop styles to use in Linux. XFCE is a popular lightweight desktop that runs fast on older computers, like the ones we typically have.

Ubuntu is likewise a fork of Debian, which is a major distro that many others are based on. Most of what you learn with Xubuntu applies to other Debian-based distros.

Making Changes, Superuser
Most important changes to the system like installing programs need to be done under a root account. The account you created when you installed Xubuntu originally and usually sign into is not the root account. This is for safety and security.

The simplest way to sign in as root is by typing su in the terminal. It will then ask you for the root password, which is by default the same as the user account password you set up during installation.

More common though, is typing sudo. Typing it before any command will run only that command with root permissions. This is a way to quickly run a command as root without having to actually sign in a root. It will ask you for your user password, and if your user account is on the list of approved sudoers (the one you set up during installation will be by default), the command is run with root permissions.

For graphical programs that must be run as root, it is recommended to use gksudo instead. An example of a graphical program that you might want to run as root is...

Using External Media
When you plug in a key drive or external hard drive, Xubuntu will automatically detect it and mount it. You will see an icon on the desktop that can be used to access it. Inside the filesystem, the key drive will actually be mounted inside the /media directory. You may have to look there if the icon does not appear.

Files and Folders
To see folders (GUI)

To see in terminal...

ls, cd, cd .., pwd

Linux has a standard set of folders that come with it and are used for different things. This is called the Filesystem Heirarchy (FHS).

Every file and folder in Linux has a set of permissions associated with it.

Owner - what the owner can do

Group - what users in the same group as the owner can do

Others - what everyone else can do to the file

For each type of user, there are three different operations they can potentially do, read (r), write(w) and execute(x).

If you type ls -al, you will see what permissions are set on a file.

CHMOD

The Command Line
Xubuntu, our standard linux distro has GUI tools for everything, but there are a few basic commands everyone should know, and are still very useful.

It can actually be quicker to type in a command for some things than click through menus.

In a work environment, most Linux administration is done from the command line. For example, a server used in an office to share files or to host a web site often doesn't have a desktop, which saves resources so it can run as fast as possible.

Another reason to learn the command line, is that anything that can be done with commands can be automated by putting it in a script. This is useful if you ever have to run a dozen commands on each of a hundred computers.

Text Editors
Many different settings in Linux are stored in configuration files. These are often simple text files that you can look at and change manually.

cat to quickly read a file in terminal.

gedit is a common graphical text editor (make sure this comes with xubuntu and not leafpad). Many config files need root permissions to edit, so gksudo gedit to edit a file.

You may have to edit a config file from within the terminal if you aren't able to get to the desktop. The easiest terminal text editor is nano. vi is an older text editor that takes more practice to use, but might be worth learning because it is found in nearly every Linux distro, even extremely minimal distros like the firmware of an electronic device.

/etc/apt/sources.list is an example of a config file that you may have to edit to install some programs.

Installing New Programs
GUI (synaptic?)

.deb packages

apt-get

dpkg -i