1、關(guān)機(jī)/重啟
- shutdown
shutdown 選項(xiàng) 時(shí)間-
-r重新啟動(dòng)- 不指定選項(xiàng)和參數(shù),默認(rèn)表示一分鐘之后關(guān)閉電腦
- 遠(yuǎn)程維護(hù)服務(wù)器,建議不要關(guān)閉系統(tǒng),應(yīng)該重新啟動(dòng)系統(tǒng)
shutdown -r now-
shutdown 20:2520:25分關(guān)閉 -
shutdown +10十分鐘之后關(guān)閉
2、查看或者配置網(wǎng)卡信息
- 網(wǎng)卡和IP地址
- 類比:電腦--->電話; 網(wǎng)卡--->sim卡;ip地址--->電話號碼
- ifconfig
- ping ip地址
-
ping 127.0.0.1本地網(wǎng)卡是否正常
-
3、遠(yuǎn)程登錄和復(fù)制文件
- ssh基礎(chǔ)
- 數(shù)據(jù)傳輸是加密以及壓縮的
- 域名/端口號(通常為22)
- ssh的簡單實(shí)用
-
ssh [-p port] user@remote- user 遠(yuǎn)程機(jī)器的用戶名
- remote 遠(yuǎn)程及其的地址
- port 是SSH server監(jiān)聽的端口
-
- scp
- 跟
cp很像 -
scp -P port 文件 user@remote:Desktop/文件把本地的文件復(fù)制到遠(yuǎn)程 -
scp -P port user@remote:Desktop/文件 文件把本地的文件復(fù)制到遠(yuǎn)程 -
-r傳遞文件夾
- 跟