10 basic Linux commands that should be remembered by new Linux beginners

Source: Internet
Author: User

10 basic Linux commands that should be remembered by new Linux beginners

Linux has a huge impact on our lives. At least, your Android phone has a Linux kernel. However, starting Linux for the first time will only make you feel uncomfortable. In Linux, you should usually use terminal commands instead of just clicking the starter image (as you do on Windows ). But don't worry. The 10 basic Linux commands and important commands described below will help you get started as soon as possible.

When talking about Linux commands, we are actually talking about the Linux system itself. In this case, 10 basic Linux commands in the partition won't make you a genius or a Linux expert. It helps Linux beginners to use these basic Linux commands or common Linux commands to process basic daily tasks.

Now, we will introduce these 10 basic Linux commands one by one.

1. sudo

This SuperUserDo is the most important command for Linux beginners. This sudo command is required for every command that requires the root permission. You can use sudo before each command that requires the root permission.

  1. $ Sudo su

2. ls (list)

Like others, you often want to see anything in the directory. With the list Command, the terminal will display all the files and folders in the directory you are processing. Suppose I want to view the directories and files in/home in the/home folder.

  1. /Home $ ls

The ls In/home returns the following results:

  1. Imad lost + found

3. cd

Changing the directory (cd) is the main command that is always used in the terminal. It is one of the most basic Linux commands. It is easy to use this command. Enter the name of the folder you want to enter from the current directory. If you want to return the upper level, you only need to take the double circle (...) as the parameter.

Suppose I want to enter the usr directory in/home. Here is how I can use the cd command:

  1. /Home $ cd usr
  3. /Home/usr $

4. mkdir

Changing directories is not comprehensive. Sometimes you want to create a new folder or subfolder. You can use the mkdir command to do this. Put your folder name in the end of the mkdir command.

  1. ~ $ Mkdir folderName

5. cp

Copying and pasting is an important task to organize and organize files. Using cp will help you copy and paste files from the terminal. First, confirm the file you want to copy and enter the destination location to paste the file.

  1. $ Cp src des

Note: If you need root permission to copy files to any new files, you need to use the sudo command.

6. rm

The rm command can remove your files or even your directories. If the root permission is required for the file to be removed, you can use-f. You can also use-r for Recursive removal to remove your folder.

  1. $ Rm myfile.txt

7. apt-get

For different releases, this command is different. In Debian-based Linux releases, we can use the advanced packaging tool (APT) Package Manager to install, remove, and upgrade any software packages. The apt-get command can help you install the software that needs to be run in Linux. This is a powerful command line tool that can perform installation, upgrade, or even remove software.

There are different package managers in other releases (such as Fedora and CentOS. Fedora used to have yum, but now it has dnf.

  1. $ Sudo apt-get update
  3. $ Sudo dnf update

8. grep

You need to find a file, but you cannot remember its exact location or path. Grep can help you solve this problem. You can use the grep command to find the file based on the given keywords.

  1. $ Grep user/etc/passwd

9. cat

As a user, you often need to view some documents or code from the script. Similarly, one of the basic Linux commands is the cat command. It will display the text in the file for you.

  1. $ Cat CMakeLists.txt

10. poweroff

The last command is poweroff. Sometimes, you need to shut down the instance directly from the terminal. This command can complete this task. Do not forget to add sudo at the beginning of the command because it requires the root permission to execute poweroff.

  1. $ Sudo poweroff


As I mentioned at the beginning of this article: these 10 basic Linux commands will not immediately turn you into a Linux geek. It will help you start using Linux in this early stage. Use these basic Linux commands to start using Linux and set a goal: to use one or three commands every day. This is the purpose of this Article. I hope it will help you.

Original article title: 10 Basic Linux Commands That Every Linux Newbies shoshould Remember, Author: Mohd Sohail

This article permanently updates the link address:

Related Article

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.