操作
-
命令行訪問網頁
lynx www.baidu.com -
下載
wget XXX(下載地址)
yum –y install xxx -
解壓縮包
tar -zxvf xxx.tar.gz -
根據端口查詢PID
netstat -antup | grep xxx
kill PID -
環境配置
vim /etc/profile
xxxx配置環境xxxx
source /etc/profile使變量生效
問題
-
/etc/hosts
直覺的認爲,更改/etc/profile需要進行source,那麼更改/etc/hosts也需要source才生效,但是其實不是,如果source就會一直出現-bash: 127.0.0.1: command not found。最後才發現,source執行的也是bash,在父shell的環境中執行。而/etc/hosts只是簡單的文本文件,不是shell解析的,不能用source命令(笑哭……)