Linux terminal commands provide direct manipulation to a system or its any component. It’s like a master control panel from which each and every part is accessible and can be manipulated.
A terminal is an emulator and works off most common UNIX operating system commands. The Terminal is an associate powerful tool, it provides a command line interface to input commands and obtains output from your package. Although Terminal, that is CLI (command line interface), is even a lot more powerful than GUI (graphical user interface).
Terminal works off a text-based interface and every command have to be compelled to be typewritten. this might be the explanation why some individuals are afraid off by it!. Fortunately, not all commands are shivery. in this post, we’ll show you basic useful commands you’ll perform with Terminal that might be of use to you currently, or in the future.
Before we start
All of the Terminal commands here showed are safe to use and, once it involves dynamic preferences, are fully reversible. Make sure you’re coming into the commands specifically as they’re written here. Also, make sure you have got a recent backup just in case one thing will happen. Before proceeding to commands I just give you a short overview of how to open terminal(for those who are new to Linux/Ubuntu).
To start terminal there are two options listed below:
1. Select Applications > Utilities > Terminal
or you can open terminal through GUI
2. On empty desktop > right_click > Open In Terminal.
Useful Linux terminal commands that are useful for everyone
The ls command allows you to list the contents of the given directory or if the directory is not specified then ls command lists the content od current directory. ls command is basically file operation related command which one can regularly use for listing the files under given directory.
the cd command is used to change the directories. For example, if you want to change the directory from the Downloads directory to the Desktop directory, you would input the following command in the terminal as shown below:
The touch command is basically used to create a new file of your given extension. To create a new file at a specific location with the specified extension you can use touch command. By using touch you can create one as well as multiple files as shown below in below example:
ps command provides a statistical view of currently running processes in the system. You can see which processes are currently running and the usage of the system to particular process can be view by executing ps command in the terminal. The output of the ps command
By using mkdir command you can create one more than one directories or subdirectories by generating errors if the file name already exists or when there is an attempt to create a directory that does not exist. The -p option are used to create missing parent directories for the requested path. Following example shows how to create a directory using mkdir.
The name says everything about what it would do. When your terminal got full of readouts and information, you may want to clear the stuff present on your terminal so for that you need to type this command to clear the terminal screen. The clear command clears the screen as you can see in the following example.
The man command or the manual command is used to show the manual of the inputted command. It shows the help page in the terminal. If you don’t know exactly what is the use of a specific command and what is the option that you can use with that command then don’t need to worry just hit the man command with the desired key-command that you to need to search about.
[email protected]:~Desktop$ man ls
kill command is used to end the task which is running in the system. By using ps and top command you can get the pid of the process and you can use this pid to end the process by using kill command. Following example shows how to use the kill command to kill the process.
If you don’t know that in which directory you are currently working then you can use pwd command. Present working directory (pwd) is the command used to show which directory you are currently in. It simply prints working directory. You can see how to use pwd command to see the working directory.
The mv command – move – permits a user to move the file to a different folder or directory. If you want to move the location of one file to another location then you may use mv command.
The grep command helps you filter the results from the PS command. not only ps command you can use grep command with other commands to filter the result. By using pipe operation you can concat the output of the first command with grep command’s output.
This article has covered the common switches but there are more available and more formatting and sort options. I hope this command help you to simplify your tasks.
If you have any better suggestion then let us know from the comment section below.