Linux Basic Notes

Source: Internet
Author: User
Tags time zones

One: Command summary
Id-u root displays root ID number, normal user ID,CENTOS6 starting from 500, centos7 starting from 1000 TTY display current user login terminal information w display user details of the currently logged on system who displays the user profile of the currently logged on system whoa MI shows what user logged in system brief information who am I shows what user logged in System details ntpdate IP time synchronization init 3 Enter the character interface, if in graphical interface 5, then turn off graphics RunLevel show from which runlevel to enter the current RunLevel CHVT 5 Switch the fifth terminal of the character interface, when the Ctrl+alt+f5 shortcut keyboard fails, use enable to view the internal commands enabled enable-n PWD to close internal commands pwdhelp can also list internal command alias command aliases settings Unalias Cancel command alias Settings hash system run the command recorded in memory, through the hash can see hash-d yes from memory record Delete command Yeshash-r empty hash cache which Yes view command path which-a Yes when this command (binary files) when in multiple directories, use this command to view which--skip-alias when the command has an alias, use this option to skip the alias display Whereis in addition to displaying the command path, the Help document path Whatis RM View the simple description of RM, The principle is to view the system Help database, all when the system was just installed may not be used, need to manually establish Makewhatis create Whatis database, centos6mandb create Whatis database, Centos7history-n Read the newly added history in the history file into memory History-p History-s Forge history screen-s AAAA Create AAAA session screen-ls see what sessions are on the system Screen-x AAAA by name connect screen-                        r XXX by ID number connection exit exits and interrupts session CTRL + A, separate press D to exit the session, but does not interrupt the session screen two functions: ① set up a session, the same account of the different logins can be shared session ② remote connection to the server, in order to prevent the remote connection due to network cause disconnection caused the operation to terminate, you can put the operation on screenWords, such as copying large files, production environment replication requires speed limit hexdump-c files to view file Scii code, such as viewing binary file date View system time command clock-s Synchronize hardware time to System Clock-w synchronize system time to hardware Timedatectl CENTOS7 command Timedatectl list-timezone list all time zones timedatectl Status View native area Timedatectl Set-timezone Asia/shanghai Set the time zone tzselect centos6 command shutdown-c cancel the Shutdown Cal Calendar command before you use the man query command, you need to use Whatis to confirm the chapter of the command, for example: passwd both/etc/passwd files and/bin/ passwd command Whatis passwdman passwd View/bin/passwd Command description document Man 5 passwd view/etc/passwd file description document man-k password Search Help LSBLK view block devices by keyword   Information DF View disk Information ldd/bin/ls View command call Library Pwd-p show the true path of the soft connection basename take the last layer of the path dirname as long as the path, do not file name Uname-r view kernel source makes the modified environment variable file effective immediately. Same as source function wall broadcast message echo-e in "Hell" system (\c un-wrap) echo is both an internal command and an external command to ensure that the command is always available, because different shell-supported commands cancel the alias call \ls command call order alias and gt; Internal commands > External commands
II: Document Directory description
/bin/bash 文件里集成的命令,是内部命令,系统启动就加载到内存里/bin/ 此目录下的命令(除bash外),是本地文件,是外部命令,在调用时才加载到内存/etc/profile.d/ 在此目录下建立环境变量有关的文件,文件名任意,但必须以.sh结尾。这个目录是/etc/profile  (每个用户环境设置)的子目录,在/etc/profile.d/ 下自定义文件可以避免修改/etc/profile带来的问题/etc/profile 每个用户登录时环境变量和程序启动文件/etc/bashrc 系统全局函数和别名设置文件(此文件由~/.bashrc调用)~/.bash_profile 用户登录时环境变量和程序启动~/.bashrc  用户别名和函数设置/etc/sysconfig/network-scripts/  网卡配置文件路径/etc/centos-release  查看系统发行版本/etc/redhat-release  查看系统发行版本/etc/shells 系统当前支持的shell/etc/localtime 时区文件,不是文本文件/etc/sysconfig/i18n系统语言设置文件/etc/motd  登录后系统信息提示文件/etc/issue 登录前提示信息/proc 下内容来自内存,所以这个目录不占用磁盘空间/proc/cupinfo CPU信息/usr/share/doc 软件帮助目录/sys 硬件设备echo ‘- - - ‘ >/sys/class/scsi_host/host2/scan 磁盘扫描
Three: Tips
cd /misc   cd /cd普通用户自动挂载光盘操作echo {a..z}  输出a到zecho {1..10..2} 输出1到10,步长为2ctrl+d是正常退出ctrl+c是强制退出ALT +n ,一次输入n个相同字符(xshell需要设置键盘)ctrl+e跳转到命令末尾‘‘ 单引号,无法识别命令和变量“”双引号,无法识别命令,可用识别变量``反撇号,命令和变量都能识别
Four System variables:
$PS1    shell终端提示符$PATH   命令搜索路径$HISISIZE  历史记录条数$SHELL    当前shell程序

Linux Basic Notes

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.