linux命令规范 linux命令!( 五 )


外文名: Universal Time
其他外文名 G.M.T.(Greenwich Mean Time)
(3)CST
北京时间 (中国国家标准时间)北京时间是中国采用国际时区东八时区的区时作为标准时间。北京时间并不是北京(东经116.4°)的地方时间,而是东经120°的地方时间 , 故东经120度地方时比北京的地方时早约14分半钟 。因为北京处于国际时区划分中的东八区 , 同格林尼治时间(世界时)整整相差8小时(即北京时间=世界时+8小时),故命名为“北京时间” 。东八区包括的范围从东经112.5°到东经127.5°,以东经120°为中心线,东西各延伸7.5°,总宽度为15°的区域 。而中国幅员辽阔,东西相跨5个时区(即东五区、东六区、东七区、东八区、东九区5个时区)授时台必须建在地理中心地带,从而也就产生了长短波授 。“北京时间”与“北京当地时间”是两个概念, “北京时间”的发播不在北京,而在陕西蒲城(处于东七区)
(4)东八区
东八区( UTC / GMT +08:00)是比 世界协调时间 (UTC)/ 格林尼治时间 (GMT)快8小时的时区,理论上的位置是位于 东经 112.5度至127.5度之间,是东盟标准的其中一个候选时区 。当格林尼治标准时间为0:00时,东八区的标准时间为08:00
pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" cid="n486" mdtype="fences" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); border: 1px solid rgb(231, 234, 237); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); position: relative !important; background-position: inherit; background-repeat: inherit;"总结:
上面提到了很多知识:即UTC/GMT/CST/东八区
总结一下就是,北京时间(中国国家标准时间CST)采用东八区区时,即:
协调世界时(UTC)+8 /格林尼治时间(GMT)+8
也就是说+8后的时间才是北京时间/pre
logname命令用于显示用户名称 。
执行logname指令,它会显示目前用户的名称
语法为如下:
参数 :
显示登录账号的信息
su命令用于变更为其他使用者的身份,除 root 外,需要键入该使用者的密码 。
使用权限:所有使用者 。
语法如下:
变更帐号为 root 并在执行 ls 指令后退出返回原使用者
切换到root
这样的话 , 我们就进入到了root用户下 。
id命令用于显示用户的ID , 以及所属群组的ID 。
id会显示用户以及所属群组的实际与有效ID 。若两个ID相同 , 则仅显示实际ID 。若仅指定用户名称,则显示目前用户的ID 。
使用者权限:所有用户
语法
参数说明:
显示当前用户信息
执行效果如下
sudo:控制用户对系统命令的使用权限,root允许的操作 。
通过sudo可以提高普通用户的操作权限
使用者权限:普通用户
语法如下:
sudo -V
sudo -h
sudo -l
sudo -v
sudo -k
sudo -s
sudo -H
sudo [ -b ] [ -p prompt ] [ -u username/#uid] -s

推荐阅读