1. 程式人生 > >筆記 猿課2.6-2.7

筆記 猿課2.6-2.7

linux

2.6 linux環境變量

which ls 查看ls位置

/bin/ls --color=auto /var/ == ls /var/ 可以理解為ls的小名

alias s=‘ls -alt /var/’啟小名

vi .bashrc讓別的終端也可以用自定義快捷鍵


echo $PATH 看which找哪裏 PATH路徑裏的可以接運行

cp install.log /usr/bin/ 拷貝install.log到/usr/bin/

which install.log 看不到

chmod +x /usr/bin/install.log 給可查詢權限

which install.log 看到了

install.log 可直接運行了

mv /bin/ls /tmp/

ls不能用了

/tmp/ls 可用

PATH=$PATH:/tmp/ tmp加入為PATH路徑

which ls 看變化

echo $PATH

vi /etc/profile 寫進配置文件 :wq

source /etc/profile 新復制個session看下 ls which ls


2.7 快捷鍵使用

exit logout 退出

ctrl+d退出

ctrl+u 向前刪 ctrl+k向後刪

ctrl+c 中斷 試試中斷睡眠:sleep 100

ctrl+z 暫停

fg 恢復 試試中斷睡眠:sleep 100

ctrl+s crrl+q 鎖定 解鎖 死機的時候實施解鎖!

ctrl+l 清屏


筆記 猿課2.6-2.7