19 Ubuntu terminal commands Every User Should Know – GadgetVsTech | If you have currently started using Ubuntu or you are newbie to it then this post can be very helpful for you. Because in this post you are going to learn about Ubuntu terminal commands.
What is Ubuntu?
Friends, Ubuntu is also an operating system like Microsoft Windows, which is available for free for personal computers,lots of Mobile Phone devices and Servers. Which is distributed under GNU General Public (GPL), it is a Debian Linux based Operating System that provides a very simple desktop environment.
Ubuntu is a UK based Company Canonical Ltd. Ubuntu is a free operating system and it’s a very special thing.Ubuntu is free of cost and open source too.
Whose source code is publicly committed for everyone, in which developers keep improving from all over the world, if you are also a developer you can also contribute to it. And because of the open-source, we get to see newer versions from time to time.
Ubuntu was first introduced in Canonical Ltd. in 2004. The company was launched as a free project. At that time the computer was very difficult to find the software and free operating system used to be almost non-existent, but after the arrival of Ubuntu, a lot changed.
Since then many free Linux based operating systems and free software launches in the market And over time Ubuntu went too poppy. Now there is an update from Ubuntu in almost every 6 months.
Read about : How to download hotstar videos from PC or Mobile
Ubuntu is the world’s most popular network server and cloud server operating system, and it is also the most popular linux server distribution. It is also free for personal computers as well as for servers and mobile phones.
Ubuntu uses Bash as default shell and as you all know there are many BASH COMMANDS which confuse every new Ubuntu users. In my opinion you don’t need to learn all these Bash commands if you want to get familiar with Ubuntu terminal in your beginning days.
You should learn about basic ubuntu commands which will help you in performing some basic operations.
So here is the basic ubuntu commands and Ubuntu terminal commands to makes your linux journey smoother.
21 Basic Ubuntu terminal commands
Mkdir (Make directory) : This command will allows you to create new directories. We can also specify where we want to create our directories. Example :- “mkdir photo” will create a photo directory.
Sudo (superuser do) : This will allows you to run other commands with administrative privileges. This command can be useful when you need to modify files in a directory that your user wouldn’t normally have access to.
mv (move) : This allows you to move file. This command can be helpful for you when you want to move one file to another. The usage is the same as cp – mv foo /home/john would move the file “foo” to the directory “/home/john”.
Cp (copy) : This Ubuntu terminal commands allows you to copy a file. This can be helpful when you want to copy a file or folder to directories. You need to specify both the files or folder you want to copy and the location where you want it to copied to like :- cp Soo /home/Nick would copy the file “soo” to the directory “/home/Nick.
pwd (print working directory) This Basic ubuntu command will display the full directory name you are currently in.
History : This ubuntu commands display all your previous commands. You can see a very long list of commands which you have typed in past. . Each command is displayed next to a number. If you history output is too long, then use history | less for a scrollable list.
Example: you ran history and found you want to use command 1967. Simply enter
cd (change directory) :- This command will help you in changing directories. When we open the terminal we will at home directory and to move around the file system we need to type cd
Things to keep in Mind :-
To navigate into the root directory, use “cd /”
To navigate to your home directory, use “cd” or “cd ~”
To navigate up one directory level, use “cd ..”
To navigate to the previous directory (or back), use “cd -“
ls (list) : This command can be helpful for knowing all the files and folder of your current directory. You can see different information about file like – Size of file, Date on which file was created Etc.
df (display filesystem) : This commands displays file system, disk space usage for all mounted partitions. df -h uses KB, MB, and GB, if this format is preferred.
Rm (remove) : This command can be useful for remove or delete files from directories.
- rmdir (“remove directory”) – Removes an empty directory.
- rm -r (“remove recursively”) – Removes a directory along with its content.
man (Manual pages) : This ubuntu keyboard shortcuts displays the manual page for specified command.
Like :- If you want to know more about rm command then you need to type on your keyboard-
info : This command is similar to man but this will show you more depth information about that file than man.
shutdown : This command can be helpful for shutdown the computer from terminal.
top – This displays Linux system, running processes and system resources, including CPU, RAM & swap usage . You can use “q” to exit from here.
du (directory usage) : this command can be used for display the size of directories and their sub directories.
du -h can be used if KB, MB, and GB are preferred.
free : This can be used to view the amount of space available in your system. If you want to view the information in MB use Free -m
17. uname -a
uname -a : This is used for display wide range of information about system including machine name, kernel name & version, and a few other details. This is Most useful for checking which kernel you’re using.
chmod – This command can be useful for change permission on a file.
cat – This command can be useful to View file content.
grep : This command can be useful for you when you need to find a file file but you don’t know exact file location. This ubuntu keyboard shortcuts will help you in that situation.
poweroff : When you directly want to power off from terminal this Ubuntu terminal commands can be useful for you. Don’t forget to add “sudo” at the beginning of the command since it needs root permission to execute poweroff.
ubuntu terminal commands list
|Ubuntu Terminal commands||Function|
|1. sudo||To gain root privilege|
|2. mkdir||To create new Directories|
|3. mv||Rename or move a file/directory|
|4. pwd||Display the full directory name|
|5. history||Display all your previous commands|
|6. Cp||Copy Files/Directories|
|7. cd||Change Directory|
|8. ls||list directory contents|
|9. df||displays file system, disk space usage|
|10. rm||remove/delete file/directory|
|11. man||Displays a manual page|
|12. shutdown||shutdown the computer from terminal|
|13. info||depth information about that file|
|14. top||displays information on your Linux system,|
|15. uname -a||all system information, including machine name,|
|16. chmod||change permission on a file|
|17. free||view the amount of space available in your system|
|18. cat||View File contents|
|19. grep||find a file file but you don't know exact file location|
|20. poweroff||power off from terminal|
|21. du||Displays the size of a directory|
Best Picks for you :
I hope you will find this post helpful. Please do share this post with your friends to support us. I will see you in next post till then be happy.
Founder and editor of GadgetVsTech Who mainly publishes posts related to new technologies, gadgets and open-source world. His main hobbies are Youtube, Blogging, search engine optimization and making good friends. He is very passionate about blogging and gives his 110% toward his works.