What are the common Linux commands

Source: Internet
Author: User
Tags mkdir

1. Mans

I started with the man command because in many ways it was the most basic command. This command is a command you need to use when you need to know other commands.

In essence, the "man" command gives a simple introduction to the other commands in the online book. It allows you to understand the basic functions and usage of these command lines. You can even enter "man man" to get the Manual of "man" directly.

Any time you feel unsure about a command line, you can learn exactly what the command can do by typing "man + command".

2. ls

Another basic command is "LS", which is used to display the contents of the directory. For example, "ls~" to display the contents of your home directory.

3. pwd

To know the directory you are working in, enter "PWD", which means "output working directory". For example, enter this command in the desktop directory and return to "~/desktop".

4. cd

To change the directory you are in, use this command. To switch to the desktop directory for example, enter "Cddesktop".

5. mkdir

This command is used to create a new directory. For example, "mkdir pictures" creates a directory called "Pictures" in the directory.

6. Find and locate

To search for a file, you can use "find" or "locate", both of which are similar in usage and function.

7. CP

You can use this command if you want to create a copy of a file and rename it. Enter "CP Cats Dogs" and you will get a copy of the "Cats" file named "Dogs", and the file "Cats" still exists.

8. MV

With the MV command, you can change the name of a file or move it to another folder, or both. Enter "MV Cats dogs" To rename the file "Cats" to "dogs" and enter "MV Cats ~/desktop" to move the file "Cats" to the desktop directory without renaming.

9. More

The "more" command lets you see more content in one screen at a time.

Kill

You have to close a program, which is probably the most efficient way to do it. Use the PS command to locate the process ID you want to close, and then type kill to close the process.

sudo

Part of the reason Linux systems are so secure is that only root users have the privilege of installing, uninstalling software, and other significant changes. To install a program, a normal user can temporarily obtain the root privileges of the user through the sudo command. But you must enter the root user's password.

passwd

Want to change your password? Enter this command in the terminal, which prompts you to enter the current password and then enter the new password.

Remember: The distribution documents you use often can help you. For example, in Ubuntu, the Help section in the command line is a good place to learn these commands.

Linux.org's "Getting Start with Linux" Guide is also a good place to explore.

On the other hand, learning some basic command lines is the first step in your better use of Linux. Soon you will find that these command lines have become your friends.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.