So let's get started with top Linux commands.
With sudo command we can work as root user in Ubuntu. If you need to install any package or change the permissions in file system, then use sudo. root password is required for perfume actions with sudo command. but I don’t recommend you to use sudo commands with unsure situations. It can completely change your system settings due to your minor type error. To become root user type following:
2. cd (change directory)
This command is use to change the current directory to another. for example : if you in home directory, type this for change it to root(/) directory.
3. ls (list)
To list the directories, folder, and files in current directory use ls command. but we cannot see the files starting with double dots. These files are know as hidden files in Ubuntu. to list them type following:
4. rm (remove)
This command “rm” allows users to remove files and directories from the system. without any option you can delete single file from rm command. to delete entire directory use following rm command with –r option. rmdir command is also similar to this one. syntax is following:
5. cp (copy)
Copy and paste is most useful in file management. The command “cp” is used to copy files or folders from one location to another. to copy directories use –r option with cp command. Syntax is following:
cp source_file_location destination_file_location
to copy directories :
cp -r source_dir_location destination_dir_location
Note : Sometimes you want to be root user for copy the files. So use sudo.
The command “cat” is used to display the entire content of the text file. Use the following the syntax:
7. mkdir (make directory)
The command “mkdir” allows users to create directories/folders in the Ubuntu system.. Just give your folder name after mkdir command in your terminal to do that.
with Ubuntu(Linux systems) you can make directory in another directory with –p option. following way:
mkdir -p dir1/dir2/dir3
To power off your Ubuntu system within 5 seconds from the terminal use the following command: (There are more useful options in this command. use man command to explore with them. ex : schedule the power of process)
shutdown –h now
In the Debian based Linux distributions like Ubuntu, to install, remove and upgrade any package we have the Advanced Packaging Tool (APT) package manager. With apt tool you can easily install any software on Ubuntu with all dependencies. In the past we need to download software package and compile it from terminal and install. That was most uncomfortable experience for Noob users. Instead of that we have APT tool. To install, remove or upgrade any package we need the administrative privileges.
Syntax of apt for install package is following:
sudo apt install package_name
To update the Ubuntu system:
sudo apt update && upgrade
To remove any package:
sudo apt remove package_name
10. man (manual)
The command of “man” also know as the manual and it is used to display the user manual of any built-in Ubuntu command. This command is most useful command when you deal with unsure commands on Ubuntu. The syntax is following:
example : man cp
11. nano (Text Editor)
Editing the text files is common task in Ubuntu systems. Nano is simple text editor in Ubuntu. another advance text editor is vim. I recommend nano for Noob users. Syntax is following:
12. pwd (present working directory)
To print the present working directory type the“pwd”command.
With these basic Ubuntu commands, start using Ubuntu and turn your daily target to learn 4-5 commands. So it's all for this basic intro article. I hope it helped you lot to get started. Share with us your interesting and useful Ubuntu commands in the comment section below. Don't forget to share this intro article with your friends on social media or any place on the Internet.