Linux Basic Command Summary update (DRY goods!) )

Source: Internet
Author: User

Alias: View command Aliases (aliases are valid only for users)

Alias H=hostname (definition alias)

Cdnet= ' cd/etc/sysconfig/network-scripts/' (with single quotes with parameter commands)

Want to work long-term change. bashrc file (root is/ROOT/.BASHRC, all users are/ETC/.BASHRC, other/HOME/USER/.BASHRC)

Unalias+cmd to cancel the alias.

SHA1SUM/DEV/SR0: View the Mirror checksum.

basename: base name; (dirname: Full name)

BC: Calculators

Cat: View text file (cat/etc/issue)

CD: Switch directories

Clear: Clear Screen

Clock: Hardware clock (=hwclock)

Clock-s (Modify the system software time as the hardware time base)

Clock-w (Modify hardware time as a basis for system software time)

CP: Copy

Date: Day

Modify Date: (date 07161030201720 months and years)

or date-s ' 2017-07-16 10:30:20 '

echo $ (date +%f)

2017-07-16

+%F Calendar +%t time (several minutes) +%y year +%m month +%d day +%h +%m minutes +%s seconds +%s (number of seconds calculated from 1970)

DD: Test Drive Read and write speed

Echo: Output ...

Enable to view internal commands

Enable-n: Can view disable internal command (enable |WC-L statistics output Internal command number)

Enable CMD enables internal commands;

Enable-n cmd to disable internal commands;

Exit =logout=ctrl+d=quit

FG: Can continue through FG after the Ctrl+d pause command.

File: Post-add file to see the types of files Oh.

Free: can view system memory resources and process usage

Gedit: A visual text Editing tool

Halt shutdown (CENTOS6 power off, Centos7 power off)

Hash hash cache (memory holds external commands used from login)

Hash-l all cached external commands include aliases

hash-d cmd Delete Cache command

Hash-p path name aliases the command path

Hash-r Clear All Cache commands

Help: Assist (internal help cmd; external cmd--help)

Hexcump: Typically used to view binary hexadecimal encodings, you can actually view any file, not just the binary

History: can view historical commands

Hostname: View host Name

Hwclock: Viewing hardware clocks

Iconv F gb2313 file-o file to convert files to Chinese format

Id-u View User ID (0 is root centos6,500 above for ordinary users, Centos7 for the =echo $UID

Ifconfig: Can view information such as IP, Gateway, route, subnet mask, etc.

Init 0/1/2/3/4/5/6 Switching user mode 0: shutdown, 1: Single user, 2: Multi-user, 3: Character interface; 4:unused;5: graphical interface; 6: restart

LS: Lists the directories and files under the current file

Ls-l (in the form of a list) =ll

Ls-a (list all, including hidden files)

LSCPU: View information such as CPU model (CAT/PROC/CPUINFO)

Lsblk to view hard disk partition information

Login: Log In

Logout: Log Out

Mount: Mount

mkdir Creating a Directory

mkdir path-p Creating a multilevel directory

Nano: Small and practical editor

Ping: can test network condition

PS: can view all current TTY

Quit: Quit

Reboot restart

RM Delete command

RunLevel to view the user's current init and last Init

RZ: Can accept files from window

SZ: Can send files to Windows

Stat Display file timestamp

Screen: Remote multi-person interaction with the same interface

Shutdown shut down the machine

Shutdown-h now (immediate shutdown) ' The system would ... '

Shutdown-h +m (shut down after M minutes)

Shutdown-r restart

Top: Can view details such as current running process, port number, etc.

Touch: Create a new file or overwrite a file that already exists

TTY: can view terminal number (Tty[1~6] as virtual terminal, pts[0~6] as pseudo terminal)

Type: can view command type

Type cmd (inside is shell builtin, external display path)

Ulimit: Can see the limited resources under Linux

Unalias: Aliases can be disabled

Uname: Can view system type

Uname-r to view the system kernel version

W: can see information about the users who are currently logged on to the system and the programs they are executing

Whatis to view command functions or Help

Whereis can view command or file source path

Which: can view command path

Who: can view the current login user and terminal, login time information

Who-r to view runlevel information and logon hours

Whoami=who is you=who is NB ...

Yes:yes

Linux Basic Command Summary update (DRY goods!) )

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.