Linux系統上命令的使用格式;及常用命令的簡易使用說明

命令的基本格式為:? ?命令? ? [選項]? ?[參數]

ifconfig? 命令??ifconfig – configure a network interface 配置網絡接口??ifconfig其中inet addr 為本地ip地址。目前階段命令僅限于查看本地ip地址。

 

echo 命令?echo – display a line of text 顯示一行文本。echo 為回聲的,如同蝙蝠、海豚的回聲定位系統,遇到什么反射什么。例如? 遇到字符串,回顯字符串。遇到環境變量,顯示變量值。welcome to beijing

welcome to beijing? 為字符串,同樣回聲為字符串本身。? ? ? ? ??123$SHELL為環境變量? ? ? ?123$HISTSIZE指SHELL進程中保留在內存中歷史進程的數。??123$HISTCONTROL 歷史命令控制。?
echo 命令選項

 

-E ????disable interpretation of backslash escapes (default)

讓轉義符失效

-e ????enable interpretation of backslash escapes

讓轉義符生效

各種常用轉移符有

\n new line? ?換行

123

 

\t ????horizontal tab 橫向制表符? ?轉義符的一種

\v ????vertical tab ???豎向制表符 ???轉義符的一種

\b? ? ?backspace? ? 退格刪除前一個字母

123

tty命令??Print the file name of the terminal connected to standard input.顯示連接到標準輸入的終端的文件名

123? ? ? ? ? ? ? pts表示目前在偽終端

pwd命令???print name of current/working directory? ?顯示當前工作目錄

123

?history命令??? ?Display or manipulate the history list?顯示或操作歷史列表

 

history? -d 80? 刪除 第八十個命令

( history- d offset :刪除指定命令歷史 ?offset【偏移量】后面的數字就是偏移的值history -d 80 5 刪除 從第八十條命開始的5條命令)

-c清空命令歷史。只是清除內存中的,文件中的沒有清除.

-r把文件中的歷史命令追加到內存

-w把內存中歷史命令追加文件中

shutdown? poweroff? reboot? ?為關機 重啟命令。只有在root賬戶下才能執行

-h:halt

-r:reboot

-c:cancel ??取消關機

123

系統將在,123分鐘后重啟。

date命令??print or set the system date and time顯示或者設置系統的日期及時間。查看系統時鐘

圖片1

clock命令等同于hwclock命令? ??? ? 查看硬件時鐘

hwclock – query and set the hardware clock (RTC) 查詢并看設置硬件時鐘

硬件時鐘跟軟件時鐘有差異

-s, –hctosys
Set the System Time from the Hardware Clock.? ?把系統時鐘調整為硬件時鐘。

-w,–systohc

Set the Hardware Clock to the current System Time.。把硬件時間調整為系統時鐘

123

 

本文來自投稿,不代表Linux運維部落立場,如若轉載,請注明出處:http://www.www58058.com/101865

(1)
南麟劍首2018南麟劍首2018
上一篇 2018-06-27
下一篇 2018-06-27

相關推薦

欧美性久久久久