Focus on cloud service provider activities
Notes on website operation and maintenance

20 Commonly Used Ubuntu Commands and Examples

Ubuntu is a system image commonly used by Lao Zuo. Of course, some commands need to be used for operation and maintenance. Here are 20 commonly used Ubuntu commands.

1. Ls: Lists the files and folders in the current directory.

Example: ls

2. Cd: Switch to the specified directory.

Example: cd/home/user/Documents

3. Pwd: Displays the path of the current working directory.

Example: pwd

4. Mkdir: create a new directory.

Example: mkdir new_directory

5. Rm: Deletes a file or directory.

Example: rm file.txt or rm - r directory

6. Cp: Copy files or directories.

Example: cp file.txt new_file.txt or cp - r directory new_directory

7. Mv: move a file or directory, which can also be used to rename a file or directory.

Example: mv file.txt new_location/file.txt or mv file.txt new_name.txt

8. Cat: Display the file content.

Example: cat file.txt

9. Grep: Search the file for the specified string.

Example: grep "search_string" file.txt

10. Chmod: permission to modify files or directories.

Example: chmod 755 file.txt

11. Chown: modify the owner of the file or directory.

Example: chown user: group file.txt

12. Chgrp: Modify the group to which a file or directory belongs.

Example: chgrp group file.txt

13. Apt get: used to install, update, and uninstall software packages.

Example: sudo apt get install package_name

14. Dpkg: used to manage Debian packages.

Example: sudo dpkg - i package.deb

15. Wget: download files from the network.

Example: wget http://example.com/file.txt

16. Tar: Package and decompress files.

Example: tar - cvf archive.tar file1 file2 or tar - xvf archive.tar

17. Ssh: Log in to another computer remotely through the SSH protocol.

Example: ssh username@remote_host

18. Top: Display the process running in the system and resource usage.

Example: top

19. Ifconfig: displays and configures network interface information.

Example: ifconfig

20. Ping: Test the connectivity with another computer.

Example: ping 192.168.0.1

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( one )
Do not reprint without permission: Lao Zuo's Notes » 20 Commonly Used Ubuntu Commands and Examples


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge