Before you start working with the Linux CLI, you should be aware of some important differences between Linux and operating systems with which you're more familiar.
Unlike Windows or Mac OS X, Linux has a case-sensitive file system. This means that home
, Home
, and HOME
would all be names for different directories. Similarly, as you will see in Section 3.2, “Navigating the file system”, you type cd to change directories: typing CD
or Cd
instead will not work.
When you're working with the CLI, you’ll soon discover what Eric Raymond calls the “Rule of Silence: When a program has nothing surprising to say, it should say nothing.”[15]
When a command finishes running (say, if you create a directory foo
using mkdir), there will be no confirmation message of something like
directory ‘foo’ created
Rather, there will only be a message if there’s a problem, as in
mkdir: cannot create directory `foo': File exists
Although you might use spaces in file and directory names in Windows or Mac OS X (such as Paper due tomorrow.doc
), don't use spaces in file or directory names in Linux. Use underscores (the _
character, usually on the same key as -
) in a file or directory name (such as Paper_due_tomorrow.doc
) instead of spaces. In fact, it's best if the only characters that you use in file and directory names are letters, numbers, hyphens (-
), underscores (_
), and periods (.
), although you shouldn't start a file or directory name with a period, since, as noted in Section 3.2, “Navigating the file system”, doing so makes the file or directory hidden.
When you use a command that would make some permanent change in the file system (such as deleting files or renaming a file such that it would replace a pre-existing file), the system will not ask you
Are you sure?
You will only be prompted for confirmation if you explicitly ask for it, such as by using the -i
command option that is mentioned in Table 3.3, “Commands for manipulating the file system”.
Similarly, the Linux CLI has no Trash or Recycle Bin for files that you decide to delete but might want to restore later. Deleted files are simply deleted.
[15] From Eric Raymond's The Art of Unix Programming (Boston: Addison-Wesley, 2003). Found online at http://www.catb.org/~esr/writings/taoup/html/ch01s06.html#id2878450.