From the previous text I introduced UNIX and some of it’s features. By this text I want to introduce you some of the basic commands of LINUX Operating System. Which is another free and Open Source Operating System same as UNIX. Though there are so many LINUX variants, all of them use same set of commands.
WHY LINUX COMMANDS?
LINUX has a Graphical User Interface (GUI) and a Terminal (same as the cmd in Windows) to use the Operating System. But as a learner it’s good to use the terminal instead of using the GUI. Because in Terminal we have to type commands and then run them to do something on the computer. This will improve your knowledge and will give an idea about how the back end works.
WHAT IS TERMINAL?
As I mentioned earlier, the Terminal is somewhat similar to the command prompt (cmd) in Windows Operating System. We can find the Terminal by searching for ‘terminal’ in the search area. The shortcut for the Terminal is ‘Ctrl + Alt + T‘
Above I have put a screen shot of the Terminal of mu computer. There are some specific things to know about the text which is already there. It shows the user of the computer. After the ‘~$‘, you can give the command and hit enter to execute.
WHAT IS A COMMAND?
Command is something which is predefined and will do a specific task when it is executed. For example ‘ls‘ is the command for listing items which are on the current location or in the working directory. Some commands we can type without any arguments. But for some commands arguments are mandatory. Arguments will change the basic usage of a command specifically. For example, for the command ‘ls‘ it has an argument called ‘-1‘. This will list the items in the working directory line by line. An argument is given with a dash (-) and then the argument.
Let’s look at few basic LINUX commands in use.
WHAT ARE THE BASIC COMMANDS?
- echo : This will used to print something on the terminal. In the example I have given a to print and I have given it within the single quotes (‘a’).
- ls : This will list the items on the current location.
- cd : Change directory to another location. Should give the path to the location as the argument. With no arguments it will redirect to the Home.
- pwd : This will show the current directory or the working directory of the user.
- man : This is the most useful command in LINUX. Because it gives information about all other commands. If you want to know about a command then use man. The result will be on a different page. so go back to the previous page hit ‘q’.
- lsb_release -a : This will list down information about your installed OS version and other details.
- clear : This will scroll down the terminal and show a cleared view of the Terminal. But when you scroll up, you can see the previous code.
- reset : This will reset the terminal and show a new cleared terminal window.
IS THERE ANY SHORT CUT KEYS?
Yes, There are some short cut keys too.
- Ctrl + C : When you got stuck in the middle of typing a command, then you can use this short cut keys to get rid of it.
- Ctrl + L : To clear the terminal.
- Ctrl + Alt + F2 : When your computer is frozen ed, then you can try this command to open a new full screen terminal window. From that terminal you can run commands too.
- Ctrl + Alt + F7 : When you are in the full screen terminal mode, use this to come back to the GUI.
- Arrow Keys : When wanting to type commands repeatedly, this is a good choice. Using the Up, Down arrow keys, you can go through previously typed commands.
In this text I have given some basic commands in LINUX. But that’s not all. There are so many other commands such as file manipulation, working with directories, processes of the computer and etc. From the next text I’ll hope to come with the commands of File Manipulation and directory handling in LINUX through the Terminal. Thank You!