Linux Basics

There are a few things new Linux users should know to avoid confusion and frustration. Here are a few tips.

Paths Use Forward Slashes /

Use forward slashes (/) in a pathname, not backslashes.

/etc/apt/sources.list   Correct
\etc\apt\sources.list   Wrong. This will not work!

The forward slash separates directories in a path while a backslash escapes special characters. For example, \n is a newline and \” allows the ” (double quote) character to print within a double-quoted string. The backslash character (\) itself does not print.

echo "He asked, \"What?\""
He asked, "What?"

One way to help remember this is to think of a URL typed in the address bar of a web browser. Just as a URL uses forward slashes as in http://www.someplace.anywhere/path/file.htm, Linux follows the same forward slash pattern for paths.

There Is No C: Drive

Your computer might contain multiple hard drives, but they are referenced as devices with names like /dev/sda for the first drive and /dev/sdb for the second drive. Linux does not use drive letters such as C:\ or F:\.

Instead, each drive is mounted into its own directory, called a mount point, that becomes a part of the Linux directory structure. To access a hard drive, open its mount point directory like you would open any other directory. To Linux, a hard drive is just another directory filled with files.

Mount points are needed because you do not access the hard drive device files /dev/sda or /dev/sdb directly. For example, instead of typing ls /dev/sda, enter ls /path_to/mount_point.

Hierarchical Filesystem

All directories are arranged from a starting point called root that is represented by a single forward slash.


All files and directories (including mount points) stem from root in a hierarchical structure, not from different drives or partitions named C:\, D:\, F:\, and so on.

Root Directory and Root User

You might hear phrases like “root user,” “root access,” or just plain “root.” This usually refers to the system administrator or superuser of the system who may access any file and perform system-level tasks such as installing software and managing users. The root user has nothing to do with the root directory of the filesystem. They are two different things.

Root used by itself depends upon context. When referring to the system administrator, then “root” means the root user, but when used to refer to the starting point of the filesystem, then “root” means the root directory.

Root and Regular Users

Unless you are an administrator, you will always log into your Linux system as a regular user, not as the root user. (Even if you are the system administrator, you should always log in as a regular user anyway.)

This is a security precaution to avoid accidental (or intentional) system changes either by users themselves or by user processes. Linux is a multiuser operating system, meaning many users can use the system simultaneously, and we do not want one rogue user messing up the system for others.

Regular users have lower privileges than the root user, and this helps protect the system. Of course, some users may be granted temporary root privileges to perform system tasks, but for everyday use, log in as a regular user.

Filenames Are Case-Sensitive

Filenames and directory names are case-sensitive. This means upper and lower-case letters matter. For example, README.TXT and readme.txt are treated as two separate files because the case is different, so they may co-exist in the same directory.

Filename Extensions Are Optional

Filenames often contain three extra characters after the dot, as in readme.txt or video.mkv. The .txt and .mkv comprise the filename extension that tells the operating system what kind of file it is so the operating system knows how to handle it.

Usually, Linux does not rely upon filename extensions to determine the type of the file. Linux looks at the file data. If Linux sees files named readme and video (without extensions), it knows that readme is a text file and video is a video file based upon the data contained within the files. This makes filename extensions unnecessary.

However, it is often a good idea to use filename extensions anyway in case the files are transferred to an operating system that depends upon filename extensions and to make it easier for users to identify file types without opening them.

Hidden Files Begin With a Dot

Filenames and directory names that begin with a dot (.) are marked as hidden files and are not shown in a normal directory listing. Files do not have hidden property settings or attributes.

.readme.txt   Hidden file
.secret_dir   Hidden directory

Both of these files are treated as hidden files. On the other hand, the following two files are not hidden because they do not begin with a dot character.

_.hidden_file.txt  Not hidden because the underscore (_) is first
 .not_hidden.txt   Not hidden because a space is first

In Linux, filenames may begin with a space, so this will cause a file to be visible even though a dot appears after the space. If a filename is not hiding even though it begins with a dot, check to make sure that the filename does not begin with extra whitespace.


This is the kind of list that could continue indefinitely since Linux contains a number of little things that are handled differently from other operating systems. While more could be included, these tips should be enough to get started to avoid common beginner frustrations during the journey of Linux.

Enjoy Linux!



  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: