Linux basic commands.Linux is strictly case-sensitiveCategories of commands:commands that the internal command shell implements in internal codeMan type view commands from bash shellcommands other than external command shellView internal or external
Common commands:W View logged in user (first behavior host load)Ifconfig-a View All Networksdhclient automatically get IP addressShutdown Command Init0 shutdown-h nowRestart command init 6 reboot shutdown-r nowLS parameter-a lists all files
User ManagementID: You can view the current userWHOAMI: Viewing the current userWho: See who is currently logged inW: can also seeAdd userUseradd Zhaoyuanyuan Adding usersUseradd-g GroupName Uernamepasswd ZhaoyuanyuanThe user's default home
file backup and compression commandsIn Linux, the commonly used file compression tools are gzip, bzip2, zip. BZIP2 is the ideal compression tool that provides maximum compression. Zip compatibility is good and Windows supports it.
Manage users and commands for setting up permissions
Command
Description
Command
Description
chmod
Used to change permissions
Useradd
Used to increase the user
Su
Used
1. Configure a static Ubuntu IP address for the NICVi/etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.0.5 gateway 192.168.0.254 NETMA SK 255.255.255.0 Dns-nameservers 223.6.6.62. Modify the download
1. Use commands with absolute paths, such as $/bin/ls 2. View the user's preset path $ echo $PATH $/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games Multiple paths separated by colons, if a command has two versions of the path
4. Commands for shutting down and viewing system information(1) Shutdown command: normal shutdown. SHUTDOWN-T 2 2 minutes after the automatic shutdown shutdown-r shutdown after the restart.(2) Reboot command: Shutdown command, but this command does
Terminal Use HelpF11 fullscreenCrtl Shift + Zoomctrl– ShrinkingCtrl u clears the command line ( clears the cursor to the front )Ctrl l Clear ScreenShift PgDn PAGE DOWNShift pgup PAGE UpBasic commandscommand composition: command word [ parameter ] [
Common Linux commands are documented for later use:First, view the server configuration1. View the number of logical CPUs and CPU modelCommand: Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-cResults:Meaning: 24 logical CPUs, CPU called Xeon, CPU
Linux will automatically start some services each time you boot, if you want to optimize the default boot system services, you can use the following two tools.1:NTSYSV command2:chkconfig commandOne, Ntsysv commandUse the NYSYSV command alone, only
Shift+g//End of textGG//To file header98GG//to the specified lineDD//Delete when moving forwardYY//Copy as ForwardP//PasteU//Cancel Last action///Down Search? Search upTime//Calculate a task execution timesLast//view current who is logged inLastlog//
#ls [path] lists the names of folders and folders under the specified path, and if no path is specified, then see templates, pictures, downloads, desktops, videos, documents, music and other options#ls-L presents the above options as a
Linux Network configuration ManagementStatically configured Ip,ifcfg-eth0 NIC configuration is as follows:Vi/etc/sysconfig/network-scripts/ifcfg-eth0Device=eth0 bootproto=static #HWADDR =00:0c:29:52:c7:4eonboot=yes #重启网卡是否激活设备TYPE =ethernetipaddr= 19
cp:copyCP SRC DEST-R Recursive replication-I interactive Tips-F forcibly overwrite-P Maintain original properties (ownership timestamp)-A: Archive replication, often used for backups (keep all attributes of the file)-P: Copy is link generated is the
Get help with the use of commands:Internal command:Help COMMANDExternal command:COMMAND--helpCommand manual: ManualMans COMMANDSub-chapters:1: User command (/bin,/usr/bin,/usr/local/bin)2: System call3: library Call4: Special files (device files)
Linux basic commands1. System InformationThe processor architecture of the arch//display machineUNAME-M//Display the processor architecture of the machineUname-r//Show the kernel version in useUNAME-A//view kernel/operating system/CPU informationCat/
Simple command:cd [File]Touch [file name]mkdir [Create directory] mkdir-p [Multilayer directory] recursively create a directoryRM [Delete a file] ls--help Display Help information for the command man instructions for displaying commands
How to use the commandShutdown--helpShutdown--?Man shutdown these three ways can beShutdown's wrong, he'll have a clue.Which command does not know how to use, ask a man on itMan is manual handbook, manual Hand, manualClearClear is the clear screen,
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.