Learning Linux is actually the process of learning Linux commands, just like learning English is a back word. There are some commands that are very basic. Linux newcomers just need to master these commands when they first contact this system. Xiaobian today collected several common commands that Linux novices have used.
1.pwd command
The command of English interpreted as print working directory (print working directory). Enter the pwd command and Linux will output the current directory.
2.cd command
The cd command is used to change the directory.
cd /Go to the root directory
cd ~ Go to the /home/user user directory
cd /usr Go to the usr directory under the root directory -- -----------Absolute path
cd test Go to the test subdirectory under the current directory ------- Relative path
3.ls command
The ls command is used to view the contents of the directory. Option Meaning -a Lists all files in the directory, including hidden files -l Lists the details in the directory, including permissions, owner, group, size, creation date, whether the file is a link, etc. -f Listed file display file type - r Reverse, from the back to the front of the contents of the directory -R recursion, this option recursively enumerates the contents of all subdirectories in the current directory -s size, sorted by file size -h to display the size of the file in human readable way For example, use K, M, G as the unit ls -l examples.doc to list all the information of the examples.doc file
4.cat command
The cat command can be used to merge files, or Used to display the contents of the entire file on the screen.
cat snow.txt This command displays the contents of the file snow.txt, ctrl+D exits cat.
5.grep Commands
The biggest function of the grep command is to find a specific string in a bunch of files.
grep money test.txt
The above command finds the money string in test.txt, and the grep lookup is case sensitive.
6.touch Command
The touch command is used to create a new file. It can create a blank file where you can add text and data.
touch newfile This command creates a blank file called newfile.
7.cp Command
The cp command is used to copy files. To copy files, enter the command:
cp "source filename" "target filename"
cp t.txt Document/t This command will copy the file t.txt to the Document directory and name it t.
Option Meaning -i Interaction: If the file will overwrite the file in the target, he will prompt to confirm -r recursion: this option will copy the entire directory tree, subdirectories and other -v details: show the copy progress of the file
8.mv Command
The mv command is used to move files.
Option Description -i Interaction: If the selected file will overwrite the file in the target, he will prompt to confirm -f forcing: it will go beyond the interactive mode and move the file without prompting, which is a very dangerous option -v Detail: Display the progress of the file movement
mv t.txt Document Move the file t.txt to the directory Document.
9.rm Command
The rm command is used to delete files.
Option Description -i Interaction: Prompt to confirm deletion -f Force: Instead of interactive mode, do not prompt to confirm deletion -v Details: Show file deletion progress -r Recursion: will delete a directory and all its files And subdirectories
rm t.txt This command deletes the file t.txt
10.rmdir command
The rmdir command is used to delete the directory.
The above are a few commonly used commands for Linux novices. Of course, with the deepening of the Linux system learning, you will also be exposed to more commands. For details, please refer to: Linux Common Commands (including vi/gdb) Operating skills.
ISO is an image file, usually you can use the corresponding software to mount the ISO, then how to m
In the Ubuntu system, in addition to starting the deb installation package through
We all know that the brightness of the screen can be adjusted using the buttons on the display, but
We all know that most Linux system operations need to be completed using commands, but the commands
How to install OpenCV in CentOS 6.5
How to configure HTTP load balancing system
How to solve the problem that Centos can't start
Linux system settings ssh connection interrupt time skills
Steps to turn off root remote login on AIX
How to identify Linux soft links and hard links
How Linux uses the shell to view all files in the directory and its subdirectories
What should I do if I restart the card on the logo screen after installing Ubuntu 11.10?
How to extract multiple compressed files at the same time in Linux
Linux uses sonar to get the number of violations and lines of code
Summary of methods for modifying debian wheezy default configuration under Linux
Win10 preview version 10576 homemade Chinese ISO system image download 32-bit
Clever configuration: reject Win XP "strange temper"
What should I do if the win 10 system cannot be activated and restarted automatically?
Win7 system 360 cloud disk offline download function using
Win8 how to turn on or off Aero peek preview Desktop
WinXP tips for hiding desktop icons
Using the Win7 system taskbar to do the background program grouping classification
Seven tips to help protect your server data security
It only takes two steps to solve the Win8 installation software garbled problem
Windows 10 Downgrade Guide Tips for simply rolling back to Windows 7/8.1