利用電腦終端登錄服務器
1.ssh遠程登錄
ssh 服務器名@IP地址或是域名
輸入用戶登錄密碼,進入服務器
2.用戶提權
sudo -s
輸入用戶登錄密碼,在15分鐘之內不需要密碼驗證。
3.創建和刪除用戶
useradd -m 用戶名
userdel 用戶名
4.創建和刪除用戶組
groupadd 用戶組名
groupdel 用戶組名
5.將用戶移進或是移出特定的用戶組里
adduser 用戶名 用戶組名
deluser 用戶名 用戶組名
6.查看服務器連接的終端
who |grep -v dive
7.查看用戶組中的用戶
cat /etc/group
8.殺死進程
kill 進程ID
pkill - 用戶名
9.find與grep
find /Application -name QQ.app
find /Application -iname QQ.app
-i 不區分大小寫進行查找
find / -name "file*"
在根目錄下查找有關于file的所有文件。
grep -in "file2" /
cat test.txt | grep -in /
10.link鏈接
ln -s /內容路徑 /指向鏈接路徑