In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "what are the necessary commands for beginners of Linux", the content is simple and clear, and I hope it can help you solve your doubts. Let the editor lead you to study and learn what are the necessary commands for beginners of Linux.
It is very important for Linux beginners to master the basic Linux commands. Only after mastering the basic commands can they better learn the powerful commands.
1.sudo
This SuperUserDo is the most important command for beginners to use in Linux. This sudo command is required for every command that requires root permissions. You can use sudo before every command that requires root permission.
$sudo su2.ls (list)
With the list command, the terminal will display all the files and folders in the directory you are working on. Suppose I'm in the / home folder and want to see the directories and files in / home.
/ home$ ls
The ls in / home returns the following result:
Imad lost+found3.cd
Changing the directory (cd) is always the primary command used in the terminal. It is one of the most basic Linux commands. It is easy to use this command. Just enter the name of the folder you want to enter from the current directory. If you want to go back to the next level, just put the double dots (..) As a parameter.
Suppose I'm in the / home directory and want to go to the usr directory, which is always in / home. Here is how I can use the cd command:
/ home $cd usr/home/usr $4.mkdir
Just changing the directory is not comprehensive. Sometimes you want to create a new folder or subfolder. You can use the mkdir command to do this. Just put your folder name after the mkdir command in the terminal.
$mkdir folderName5.cp
Copy and paste is an important task that we need to complete in order to organize and organize documents. Using cp will help you copy and paste files from the terminal. First, you determine the file you want to copy, then enter the destination location, and then you can paste the file.
$cp src des
Note: if you copy files to a directory where root permissions are required for any new files, then you need to use the sudo command.
6.rm
The rm command removes your files or even your directories. If the file needs root permission to remove it, you can use-f. You can also use-r for recursive removal to remove your folder.
$rm myfile.txt7.apt-get
This command varies from release to release. In the Debian-based Linux distribution, if you want to install, remove, and upgrade any package, you can use the Advanced Packaging tool (APT) package manager. The apt-get command helps you install the software you need to run in Linux. This is a powerful command-line tool that can perform tasks such as installing, upgrading, and even removing software.
In other distributions, such as Fedora and Centos, there are different package managers. Fedora used to have yum, but now it has dnf.
$sudo apt-get update$sudo dnf update8.grep
You need to find a file, but you can't remember its exact location or path. Grep can help you solve this problem. You can use the grep command to help find the file based on the given keyword.
$grep user / etc/passwd9.cat
As a user, you often need to look at some documents or code from scripts. Again, one of the basic Linux commands is the cat command. It will display the text in the file for you.
$cat CMakeLists.txt10.poweroff
Sometimes, you need to turn it off directly from the terminal. This command will accomplish the task. Don't forget to add sudo at the beginning of the command, because it requires root permissions to execute poweroff.
The above $sudo poweroff is all the contents of this article entitled "what are the necessary commands for beginners of Linux?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.