As name suggests, it is an introduction for people learning to use Linux System. It focuses on command-line usage. There are different GUI tools and programs are available to perform a particular task, you may use it. The benefit of learning command-line is that, if you will learn the tools and tricks of the command line which are in many cases faster, more powerful, and more flexible than any GUI program.
Before learning Command-line usage, you should be familiar with some terms.
what is “the shell” ?
The shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix computer. Nowadays, we have graphical user interfaces (GUIs) in addition to command line interfaces (CLIs) such as the shell.
On most Linux systems a program called ‘bash‘ (which stands for Bourne Again SHell, an enhanced version of the original Bourne shell program, sh, written by Steve Bourne) acts as the shell program. There are several additional shell programs available on a typical Linux system.
What’s an xterm, gnome-terminal, konsole, etc.?
These are called “terminal emulators.” They are programs that put a window up and let you interact with the shell. There are a bunch of different terminal emulators you can use. Most Linux distributions supply several, such as: xterm, rxvt, konsole, kvt, gnome-terminal, nxterm, and eterm.
Starting a Terminal
Your window manager probably has a way to launch programs from a menu. Look through the list of programs to see if anything looks like a terminal emulator program. In KDE, you can find “konsole” and “terminal” on the Utilities menu. In Gnome, you can find “color xterm,” “regular xterm,” and “gnome-terminal” on the Utilities menu. You can start up as many of these as you want and play with them. While there are a number of different terminal emulators, they all do the same thing. They give you access to a shell session. In Ubuntu Open Start menu >> Accessories >> Terminal.
List directory contents.
long listing with dates and permissions
list all, including hidden files (hidden files start with a period)
change to previous directory
change to home directory
change to parent directory
Print current (working) directory.
cp -r somedir somedest
Copy recursively (directory and all contents).Type source name instead of ‘somedir’ and target name instead of ”somedest.
Move (or rename) a file (or directory)
Delete (remove) a file.
rm -r somedir
Delete recursively (directory and all contents). Type source name instead of ‘somedir’.
rm -ri somedir
Delete recursively, but prompt before each removal. Type source name instead of ‘somedir’.
rm -rf somedir
Delete recursively, never prompt. Type source name instead of ‘somedir’.
Remove (empty) directory.
Print file contents (to console).
Scroll through file contents, one page at a time.
SPACEBAR to advance a page, B to go back a page, Q to quit, /pattern to search for pattern
Close shell. If this is your login shell, you will log out.
shutdown -h now
To shutdown system now
These are just basics of linux command-line. if you want to know more commands, feel free to ask..
Follow Mohammed Safeer On twitter.