Archive for June, 2008

30
Jun
08

Somos los Campeones

Much against my prediction, Spain are crowned the Euro 2008 champions after 44 years thanks to the lone goal from Fernando Torres. Torres scored at the 33rd minute as he cleverly lifted Xavi’s pass over Lehmann’s head.

Spain always labeled “under-achievers” surely proved everyone wrong.

Germany v Spain - UEFA EURO 2008 Final
Image details: Germany v Spain – UEFA EURO 2008 Final served by picapp.com

25
Jun
08

The Way of the Terminal

CLI a.k.a Command Line Interface – the pre-GUI way of computing has always remained unique to the *nix Operating Systems till today. Commands which normally administer and perform system tasks are sometimes more flexible than a ‘clickable’ interface.

MS Windows on the other hand has relied on graphical interfaces mainly to cater the needs of an everyday user. The concerning factor on the Windows side, right from Windows 95 to Vista the GUI has become an “eye-catching” hysteria: my comparison to a bug attracted to a light bulb. Not going deeper into Windows, the point I am stressing is that it makes it harder for a Win user to make the shift to an OS like Linux. While there are people who are willing to experiment and test-ride Linux, most of them are irked at seeing a CLI and pass off comments like “is he back to the stone age?”

So I’m going to give a rundown on how the terminal looks like, its functionality and how it can be a powerhouse program to control your Linux system. Normally in a Linux system, you have 7 terminals which can be accessed by shortcuts Ctrl + Alt + F1 to Ctrl + Alt + F7. Terminal F1 is the init login prompt (for runlevel 3) and Terminals F2 to F6 are the virtual terminals; F7 is graphical login for runlevel 5. Virtual terminals enable multiple users to login at the same time, so you can have about 6 users logged on at a time. Home users need not bothered about this as this is usually used in Big Organizations. The graphical login is sufficient, the terminal can be accessed from the menu usually present in Accesories in the GNOME environment and System in the KDE environment. On accessing the terminal, you will be presented with a terminal window showing a prompt which normally looks like:

user@hostname:~$

user: name of the user; hostname: name of the computer; ~: depicts the current directory normally the home directory (same as My Documents in Windows); $: shows that a user is currently logged on (# for root/admin)

Secondly to use the terminal you need to know some commands, I can’t show all the commands. As a reference you can note down this page [link] with useful linux commands. Some of the important and easy ones are (omit the $ while entering these commands):

1. ls – to list the present working directory.

Usage: $ ls or $ ls /path/to/dir

2. cd – to change to a new directory.

Usage: $ cd /path/to/dir

3. cat – to view the contents of a text file.

Usage: $ cat filename

4. cp – to copy a file or a directory to a new destination.

Usage: for file $ cp /source /destination, for a directory $ cp -r /source /destination (r for recursive)

5. mv – to move a file or a directory to a new destination

Usage: for file $ mv /source /destination, for a directory $ mv -f /source /destination (f for force)

6. mkdir – to create a new directory.

Usage $ mkdir directory

7. rm/rmdir – to delete a file/directory. rmdir works only for an empty directory

Usage: $ rm file, $ rmdir empty_directory, $ rm -rf directory

Any further help to know about these commands along with the options you can refer the manual (man) pages present in your Linux system. To read a man page of a command enter $ man command in the terminal. To read a short description of a command enter $ whatis command .

This concludes the first part of this post, the follow-up will include more details as I go in-depth to show you how to Kung-Fu with the Terminal :D .