Linux system talk--learning summary

Source: Internet
Author: User

  1. CentOS Image: Mirrors.sohu.com

  2. Configuring the Linux Network (bridge mode)

    IFCONFIG-A Viewing network card information

    Dhclient refresh the NIC to get the IP.

    Vi/etc/sysconfig/network-scripts/ifcfg-eth0 Configuring network card Files

    Onbooot Yes Boot network card

    Bootproto Static IP

    ipaddr=192.168.1.119 (IP obtained by dhclient command)

    netmask=255.255.255.0

    gateway=192.168.1.1 (Router IP)

    dns1=192.168.1.1

    dns2=8.8.8.8 (Custom)

    : Wq Save and exit

    Service Network restart server restart

    Ping www.baidu.com

  3. IFDOWM eth0 turn off the NIC

    Ifup eth0 Open NIC

  4. The detailed differences between Yum install-y man and yum install man*

  5. Cat/etc/inittab viewing startup verbose boot level

    0 Halt shutdown

    1 Single user mode

    2 multiuser, without NFS multi-user no network

    3 Full multiuser multi-user

    4 unused reserved

    5 X11 Graphics

    6 reboot

  6. RunLevel viewing current levels

  7. Linux Presets 6 command terminal tty1-tty6 (ctrl+f1~f6 switch command terminal CTRL+F7 switch graphical interface)

Virtual machine due to its own shortcut key set Alt+space+f1~f6

Alt+shift+ctrl+f1~f6 graphical interface

Init 5 or StartX

8. Common shortcut keys

Ctrl+l Clear Screen

Ctrl+d=exit=logout Exit Account

Ctrl+u before deleting the cursor character

Ctrl+k Delete the character after the cursor

CTRL + C cancels the command PS. Cancellation of Sleep 100

CTRL + Z pause command or process FG Restore command or process

Ctrl+s Lock the screen

CTRL + A moves the cursor to the beginning

Ctrl+e move cursor to end of line

Shift+page up and Shift+page down page

9. Man command query command Help document (Q exit Document)

Command--help query command Help document

10. What the file color means

Green executable file or program

Red compressed file or package file

Blue Directory

White General file (text profile source file)

Light blue link file, file created using the LN command

11. Common Commands

LS lists the files or directories in the current directory

Ls-a contains hidden

Ls-l listing the details of all files and directories in the current directory

Ls-ld View

Ls-tl by time from go to post list

Ls-tla list all by time from the trip

Ls-i View inode numbers (one inode number per file)

Touch Create File

mkdir creating a directory relative to a path

mkdir/dir/: Absolute path Creation directory

Mkdir-p Creating nested directories

MKDIR-VP List Create directory procedure

RmDir Delete a non-empty directory

RMDIR-VP deletes the nested directory and lists the procedures.

RM Delete File

rm-f Force Delete do not ask

Rm-i asks whether to delete

Rm-r Deleting a directory

CD (change dirctory) Enter the directory

CD back home catalogue =cd~

CD-Go back to the previous directory (switch between the current directory and the previous entry directory)

Cd. Current directory

Cd.. Go to the previous section directory

Whoiam View Users

ID View UID GID group

echo $HOME View Home catalogue (this remains to be verified, not understood)

pwd to see your location

which command to view the absolute path of the command

Note: "ls" = "/bin/ls--color=auto"

/bin/ls list with no color

Alias definition eg. alias s= ' Ls-alt/var ' (current terminal is in effect)

CP File files

Cp-r dir dir

Cp-rv

CP File Dir

Df-h Viewing partitions

Bin/cp=unalias CP If repeated, overrides by default.

CP-R 123 ABC if ABC exists, 123 placed under ABC

mv Move or rename (if file or directory is the same, without-R)












This article is from the "Night Rain" blog, please be sure to keep this source http://lixingming.blog.51cto.com/4692271/1712965

Linux system talk--learning summary

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.