20 Useful Ubuntu Shell Commands with examples

20 Useful Ubuntu Shell Commands with examples

20 Useful Ubuntu Shell Commands with examples, this article is all about Ubuntu commands. Since Ubuntu is based of Debian most of this commands will work on Debian based systems too. Also, some commands will work on other Linux based distros like Redhat, Arch etc. On a Linux environment, commands are the best ways to do or prefer over the graphic user interface. Because, Linux itself has an intention to teach the user, how an operating system works. There for commands are very important, here goes the most 20 Useful Ubuntu Shell Commands with examples.

20 Useful Ubuntu Shell Commands with examples

1. ls : list directory contents
The ls command will show you the list of files in your current directory.

2. cd : Change Directory
The cd command will allow you to change directories.

3. pwd : print the current/working directory The pwd command will allow you to know in which directory you are located

4.  mkdir : make/create directory.
The mkdir command will allow you to create directories.

5. rmdir : remove the directory
The rmdir command will delete an empty directory.

6. rm : remove/delete file.
This command to remove or delete a file in your directory.

7.  mv : rename or move a file/directory The mv command will move a file to a different location or will rename a file.

8. man : Manual pages for shell commands.
The man command is used to show you the manual of other commands.

9. cp : Copy Files
The cp command will make a copy of a file for you.

10. shutdown : Shutdown the computer from terminal
This command shutdown the computer

11. adduser : Addition of new user
This command creating the new user in /home directory

12. passwd : Change password for user
This command change the password of specific user
# passwd ravi

13. tar :  Creates and extracts files from a tape or disk archive This command stores and extracts files from a tape or disk

14. tar :  Creates and extracts files from a tape or disk archive. This command stores and extracts files from a tape or disk

15. find :  find searches the file located at / This command find searches the directory tree rooted at each given file
# find / ­name ravi.txt ­print

16. grep :  print lines matching a pattern
This command searches the named input files for lines containing  a   match to the given pattern.

17. chown :  change file owner and group This command  changes the user and/or group ownership of each given file.

18. chgrp :  change group ownership
This command  change the  group of each file to group

19. chmod :  change file mode bits
This command changes the file mode bits of each given file according to mode

20. ifconfig :  configure a network interface
This command  is  used to configure the kernel­resident network interfaces

“20 Useful Ubuntu Shell Commands with examples”, I hope you like this article and bookmark this page for future references. Thanks for reading.

Leave a Comment

Your email address will not be published. Required fields are marked *