5 Things you Need to Know When Switching to Linux

Written by Mark Sanborn: May 12, 2008
  1. Everything in Linux is a file, even your hard drives. (dev/hda1) No c:/ stuff. Linux is based on a directory system which is all contained in ‘/’, aka root.

The ‘slash’ is very important, for example, /mnt will start at / and look for mnt. If you type mnt/file it will look in the current directory that you are in for the folder ‘mnt’ and the file ‘file’. This was very confusing for someone that isn’t used to typing paths into the command line. Windows users are used to typing c:/ for the root directory so they may forget that / is the top level.

  1. All configurations are done in text files. /etc/file and ~/.files. Get used to editing text for configuration. When you get used to it you will be far more productive. You will wonder why you ever had to navigate through screen after screen and tab after tab to find an obscure check box.

All log files are stored in text files as well. This is awesome compared to the way Windows does it because you can create your own programs easily to search and decipher the logs. No longer have to deal with complex APIs and other Windows garbage. It’s just text!

  1. Linux is built upon many small programs that do a very simple task. These programs are extremely specific. They do exactly what they were written to do and nothing more. For example, in Linux there is a program that opens and closes the CD-ROM. Thats it! Many times they are tweaked to be so efficient that there is no need to rebuild it. The Linux philosophy is to incorporate smaller programs into larger ones.

A perfect example of this would be the popular burning program, k3b. K3b is really only a front end GUI for many small programs. It uses, growisofs, cdrtools, cdrdao, dvd+rwtools, etc… If you wanted to create an automated script that burns a DVD after it is done copying, you can issue one short command.

The only problem with building upon smaller programs is that you need to have all the smaller programs or the larger one doesn’t work (obviously). If k3b is missing cdrtools you wont be doing much burning. These smaller programs are called dependencies. These days there aren’t many problems with dependencies any more because of package management programs. Package management tools will ensure that all of the programs that k3b requires are downloaded installed and configured properly.

  1. Everything in Linux is case sensitive. /path/to/File is not the same as /path/to/file. Linux tends to be exact, ‘a’ and ‘A’ are represented by completely different ascii codes. Historically, MS-DOS only used uppercase to represent filenames. In an attempt to allow lowercase while retaining backward compatibility, Windows 95 introduced LFNs (Long File Name) into the FAT filesystem. LFN allowed filenames longer than the MS-DOS 8.3, and in an effort to keep things uncomplicated, made no distinction between upper and lower case letters.

One benefit to having case sensitive commands is the ability to support commands that require many flags like, ‘command -a -A -r -R’. Another reason why case sensitive is supieror is because it is much faster at sorting. Case sensitivity also ensures that all commands will documented consistantly. If a specific command is represented as LS in one script it will have to also be used as LS in another. Using Ls will simply not work. Any programmer will tell you how important consistancy is. Since Linux was built for programmers in mind this makes sense.

  1. Hidden files or folders start with a dot. Many times these are profile or settings text files. In your home directory you may have a file like, ‘.bashrc’. This is the settings for your bash profile. To view hidden files from the command line you can execute the all command.

ls -a

Need to print shipping labels on your site?

Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.