A Few Things You Need to Know About Linux

Linux is a large, complicated collection of software; people spend years learning about its features and nuances. Thankfully, you do not need to know a lot about Linux in order to put your computer to good use. In this section, we provide you with the bare essentials: the information you need when getting started. As you need to accomplish particular tasks you may need more information, some of which we provide in [WHERE].

If you have used other operating systems in the past but are new to Linux, you may find this section particularly useful. It outlines some aspects of Linux that people find particularly confusing when migrating to Linux from another operating system.

User and Administrative Accounts

Linux is designed to be a multiuser system. In theory, dozens (or hundreds!) of people can be logged into a Linux system at the same time, all running programs simultaneously. To support the many possible user, Linux uses the ideas of accounts. Accounts are identities: they identify who is on the system and what they can do.

Even though only one person can use your computer at a time, your computer contains many different accounts. A few of these accounts (or maybe just one) are user accounts (also known as regular accounts). User accounts are used by people to log into the computer. If you do not need to type in a password to get into the IceWM desktop, then your computer likely has one user account (probably called linuxuser). If you have to type a login name and password to get into the IceWM desktop, then your user account is identified by your login name.

If you are logged into the IceWM desktop, you can use the File Manager to discover the login name you are using:

  1. Start the file manager (click on the program menu, then click on File Manager item).
  2. Read the entry in the location bar. [SCREENSHOT] It should be of the form /home/something . The something is your login name.

It is possible for all the users of a Linux system to have separate user accounts. However, most WCLP computers come with a single user account, and all the people using the computer share this account. There are advantages and disadvantages to each approach. Having a single user account means that you do not need to memorize the login name and password for your account. Every user account gets some private storage space, so having separate user accounts mean that users can customize their accounts and store data files independently of each other.

If you have a single account but want every user to have a separate account then it is possible to add users to your system. See [WHERE] for instructions on how to do this.

The Root Account

When reading about Linux, you will likely see the terms "root user" or "superuser" used frequently. These refer to the administrative account in Linux. The root user in Linux is a special account that can be used to administrate the system. The root account has total control over the system; a person using the root account can see or change any file on the system, and can run any program. However, with great power comes great responsibility: unlike regular user accounts, the root user is capable of deleting every file on your computer, configuring the computer so that it is unusable, or other bad things.

The root account is too powerful for daily use. You don't want to use it to compose Abiword documents or to surf the Internet. Use your regular user account for these tasks instead.

You should have received a root password along with your computer. If you find yourself needing to do administrative tasks on your computer, you will need this password, so be sure to keep it in a safe place. In general, you want to keep this password (and all passwords) private.

User Tasks and Administrative Tasks

Linux makes a fairly sharp distinction between user tasks and administrative tasks. A user task can be done by a user without special privileges. Most administrative tasks can only be done by the root user. Here are some examples of user tasks:

  • Writing a letter in Abiword
  • Surfing the Internet.
  • Spending hours playing gtan.
  • Changing the IceWM theme you use.

Here are some administrative tasks in Linux:

  • Adding new user accounts to the system.
  • Installing or removing software on the system.
  • Changing the date and time.
  • Shutting down or rebooting the system.
  • Configuring a new hard drive for use on the system.

Some users find this breakdown of tasks confusing. A good rule of thumb is to pretend that a hundred users are all logged into your system. User tasks affect only the user in question. For example, if you change your IceWM theme, the themes chosen by the other 99 users will not be affected. On the other hand, administrative tasks have the potential to affect many users. If you change the time on your computer, the time would change for the other 99 users as well.

Note that even though shutting down the system is technically an administrative task (and for good reason!), your computer is configured so that you can shut down the system without needing to use the root account.

All of the other administrative tasks require the use of the root account. You can learn about how to do some of these administrative tasks in section [WHERE?]. Note that you probably do not want to play around with administrative tasks until you have become comfortable with using your computer as a regular user.

Files and Directories

Files, directories, and symbolic links are three of the primary ways Linux organizes information on your computer. Files contain most of the data you care about -- the data you (and the computer) uses on a daily basis. Directories are used to organize files into a coherent structure. As always, the situation is more complicated than this: Linux offers other tools to represent and organize information, such as symbolic links, block files, hard links, and sockets. Fortunately, you are not likely to run into any of these concepts when starting out.

Files

Roughly speaking, a file is some data grouped into a single unit. Here are some examples of files:

  • A resume stored as an Abiword document.
  • An HTML file you retrieve from the World Wide Web.
  • An OGG music file by your favourite band.
  • A JPEG picture of a llama.
  • The .bashrc configuration file.
  • The xclock executable program.

Some of these files are data files that you create or download. Other files come pre-installed on your system. Furthermore, Linux creates other files (such as temporary files and log files) as you use your computer. People often think of files as similar to the files you might store in a filing cabinet (in fact, that is where the word "file" comes from.) If you can store some data in a filing cabinet, you can store it in your computer as a computer file.

Directories

The files in your machine are organized into directories. A directory contains files and possibly other directories. Many people (and operating systems) think of directores as being similar to file folders: you can store documents in a file folder, and you can nest file folders into each other. The file manager XFE follows this convention: it identifies directories with a folder icon. [SCREENSHOT]

In the /home/linuxuser directory, you can see the subdirectories My_Documents, working and downloads represented as folders.

Linux organizes directories in the following way: there is a topmost directory called the root directory, which is indicated by / . The root directory contains other directories, which can contain further directories, and so on. For example, the directory: /usr/share/doc/debian/FAQ/ refers to a directory named "FAQ", which is contained in a directory named "debian", which is contained in a directory named "doc", which is contained in a directory named "share", which is contained in a directory named "usr", which is contained in the root directory.

Similarly, the file: /usr/share/doc/debian/FAQ/index.html refers to a file called "index.html" in the "FAQ" directory. This particular file is an HTML file that you could read with your web browser.

The collection of directories on your computer is called the directory tree. Every file on your computer occurs somewhere in this tree.

Linux likes to treat everything in terms of files and directories. Unlike Windows or Mac OS, Linux does not really have a concept of "drives" (for example, "c:" or "a:"). Rather, it thinks of hard drives, floppy drives, CDROM drives, and partitions as directories. This is relevant when saving to and retrieving information from floppy disks: instead of looking in "a:" for your files, you look in the directory /media/floppy .

You should know about the following directories:

  • /home which contains home directories for users on the system. Each user account gets a directory in the /home directory in which the account's owner can store his or her personal files. Your home directory's name is the same as your username: if your username is linuxuser, then your home directory is /home/linuxuser
  • /media where you can find peripherals. In particular, you access your floppy drive by visiting /media/floppy, and access the CDROM by visiting /media/cdrom.
  • /tmp which is used to store temporary files. The /tmp directory is emptied every time your reboot your computer.
  • / which is the topmost directory.

There are many other standard directories on your Linux system. You can find out more by reading [WHERE?] or searching for "Filesystem Hierarchy Standard" on the Internet.