Pick a Free OS

Starters for Linux - Part 1

The Linux CLI however remains an extremely efficient alternative to the GUI and can often be a faster and more powerful method to move around your Linux system. For the first part of this series we shall look at using Linux the CLI way. Before we begin this epic odyssey, we would recommend you check out a previously published article at http://www.freeos.com/articles/3214/ that documents a few tips and tricks for Linux.

Using Linux the CLI way --Basic Operations on Linux

Lets start with commands that deal with Basic Operations on Linux.

Linux like any other Unix system is case sensitive so type the commands mentioned in exactly the same way as they are written in this article.

The File Separator

An important feature that differentiates Unix systems from Windows systems is the way one refers to the File Separator. On UNIX based systems it’s as follows.

/usr/local/apache/httpd.conf -----> the forward file separator.

While on Windows systems.

C:webserverapachehttpd.conf -----> the backward file separator.

any_command --help | more

Display a brief help file on a command (works with most commands). –help works similar to DOS /h switch. The more pipe is needed if the output is longer than one screen.

|

This isn’t an L, it is what we call the redirection operator. If you are trying to find it on your keyboard, you’ll probably see it on the top row with the numerical keys. The main purpose of the redirector is to redirect output from one process to another. It works at the shell level and is very handy to have around. More on this later.

ls

Lists the content of the current directory. Under Linux, the command dir is an alias to ls. Many users have ls to be an alias to ls --color.

ls -al | more

List the content of the current directory, all files (also those starting with a dot), and in a long form. Pipe the output through the more command, so that the display pauses after each screen fill.

cd /path_to_directory

Change directory. cd - will take you to your previous directory and is a convenient way to toggle between two directories.

cp /path_to_copy_form /path_to_copy_to

Copy files from source to destination.

mv source destination

Move or rename files. The same command is used for moving and renaming files and directories.

ln source destination