Linux has made a very good progress with the GUI (Graphical User Interface). But the traditional UNIX environment is a command-line interface (CLI) where you type the commands in a terminal.
Mostly you can manage to do things using the GUI but if you want to become a power user or make your Linux powerful you must use the command-line. There are many varieties of Linux, but almost all of them use similar commands that can be entered from a command-line interface terminal.
Opening a Terminal:To open a terminal in Ubuntu follow these steps:
Open the activities and search for terminal
Applications menu-> Accessories-> Terminal.
You can also open a terminal by pressing CTRL+ALT+T keys.
Now after opening the terminal let's get familiar with some commands.
- The tilde (~) symbol stands for your home directory. If you are user, then the tilde (~) stands for /home/user
- ls command gives you the list of all files in your directory.
- cd command allows you to change your working directory.For example to change into the root directory you need to type cd / in the terminal.To change to your home directory, use "cd" or "cd ~".
- cp command is useful to make a copy of a file.USAGE:cp [OPTION]... [-T] SOURCE DESTcp [OPTION]... SOURCE... DIRECTORYcp [OPTION]... -t DIRECTORY SOURCE...
- mv command will move a file to a different location or will rename a file.USAGE:mv [OPTION]... [-T] SOURCE DESTmv [OPTION]... SOURCE... DIRECTORYmv [OPTION]... -t DIRECTORY SOURCE...
- rm: Use this command to remove or delete a file in your directory.
- rmdir command will delete an empty directory. To delete a directory and all of its contents recursively, use rm -r instead.
- mkdir command will allow you to create directories.For example mkdir foo will create a folder named foo.
- man command will show you the manual page for a particular command.For example man mv will show the manual page of mv command.
- sudo command is used to perform file operations on files that the Root User would only be allowed to change. You must use the sudo command very carefully!