12 commands that Linux beginners must learn

Source: Internet
Author: User

12 commands that Linux beginners must learn

Today, users can choose whether to use the command line as a symbol of Linux according to their own wishes, which proves that Linux has developed a lot. Currently, the graphic user interfaces of many Linux distributions are very powerful and no command line is required.

However, in Linux, the command line can achieve more efficient operations. In fact, it is generally easier and more direct than clicking in the menu.

I believe that the fear of command line is the biggest mistake made by new Linux users. For this reason, let's take a look at some basic command lines that Linux users should know.

1. Man

I started with the "man" command because it is the most basic command in many aspects. This command is used when you need to understand other commands.

Essentially, the "man" command gives a brief introduction to other commands in the online book. You can understand the basic functions and usage of these command lines. You can even enter "man" to get the "man" user manual.

At any time, you feel that you are not very sure about a command line. You can enter "man + command" to understand what this command can do.

2. ls

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

3. pwd

If you want to know the directory you are working on, enter "pwd", which means "output working directory ". For example, if you enter this command in the desktop directory, "~" is returned. /Desktop ".

4. cd

Use this command to change your current directory. Take switching to the desktop directory as an example and enter "cddesktop ".

5. mkdir

This command is used to create a new directory. For example, "mkdir pictures" will create a directory named "pictures" in the directory.

6. find and locate

To search for a file, you can use "find" or "locate". Their usage and functions are similar.

7. cp

If you want to create a copy for a file and rename it, you can use this command. Enter "cp cats dogs" and you will get a copy of the "cats" file named "dogs". The "cats" file still exists.

8. mv

Using the "mv" command, you can change the name of a file, move it to another folder, or achieve both. Enter "mv cats dogs" to rename the file "cats" to "dogs", and enter "mv cats ~ /Desktop will move the file "cats" to the desktop directory without renaming.

9. more

The "more" command allows you to view more content at the same time on a screen.

10. kill

You need to close a program. This is probably the most efficient method. Run the "ps" command to find the process ID you want to close and enter "kill" to close the process.

11. sudo

Linux is so secure that only root users have the privilege to install, uninstall, and make other major changes. To install a program, you can use the sudo command to temporarily obtain the privileges of the root user. However, you must enter the password of the root user.

12. passwd

Want to change your password? Enter this command in the terminal. It will prompt you to enter the current password and then enter the new password.

Remember: The release documents you use are usually helpful. For example, in Ubuntu, the help section in the command line is a good place for you to learn these commands.

The "Getting Start with Linux" guide at Linux.org is also a great place to explore.

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

This article permanently updates the link address:

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.