PCLinuxOS New User Guide : CommandLine

HomePage :: PCLinuxOS Forum | Index | Categories | Changes | Login/Register

Command Line Tutorial

Who is it for?

This tutorial will start with the absolute basics of what the command line is and how to use it. It will cover the basic terminology and even some of the more frequently used commands. Basically, if you have never used the command line and are now in need of doing something useful via the command line or if you just want to read up on what the command line is, this tutorial is for you.

The Absolute Basics

For the purposes of this tutorial, you can think of Shell, Terminal, Command Line Interface (sometimes abbreviated as CLI or shortened to Command Line), and even konsole as being one and the same, giving you the ability to interact with the system in a non graphical way (see GUI). To begin, click on the Konsole icon in the Panel. It looks like
image
and if you hold your mouse over it, you will see "Konsole Terminal Program". When the program starts, you will see a new window that looks like this
image

A few explanations about this window are in order. Do you see the text in the window that says
[user@host] ~]$
This is called the prompt. A prompt serves two purposes, the first of which is to show some important information about your current status. This prompt tells you that you are logged in as user and your machine name is host and you are presently inside a directory called ~, which is a shorthand notation for your home directory (you can think of it as a My Documents folder in Windows). The prompt ends with a $ which is simply a delimiter indicating that all text which appears after the $ was typed in by the user. This brings us to the second purpose for the prompt - typing in commands.

In order to type anything into the Konsole window, you must first make sure that the window is selected. Use the mouse to click anywhere inside the window. Next type in
ls -al
and hit the enter key on the keyboard. Congratulations! You have just executed your first program in the command line. So what just happened? Well, you asked the command line to execute the ls command with -al option which shows the current directory's listing (this is kind of line using Exlorer in Windows). If all went well, the command line was happy to ablige and produced some output that looks something like this
drwxr-xr-x  12 user    group   840 2006-03-22 18:41 .
drwxr-xr-x  56 root    root      1488 2006-03-22 18:24 ..
-rw-------   1 user    group  1873 2006-03-22 18:41 .bash_history
-rw-r--r--   1 user    group   107 2006-01-24 07:53 .bash_profile
-rw-r--r--   1 user    group   525 2006-01-24 07:53 .bashrc
drwxr-xr-x   2 user    group    48 2006-01-20 14:56 .fonts
-rw-------   1 user    group     0 2006-02-16 12:46 .ICEauthority
drwx------   3 user    group   160 2006-02-16 12:43 .kde
-rw-------   1 user    group     0 2006-03-22 18:41 .Xauthority

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1422 seconds