screen命令可以用於多任務同時操作功能(可進行任務間的切換)
1、安裝screen
centos下安裝:
yum install screen
Debian或者Ubuntu下安裝:
apt-get install screen
2、安裝完成後,創建一個會話
screen -S 會話名
3、就能進入,運行你想運行的程序,本文以rclone掛載onedrive爲例,掛載googledeive方法也差不多,運行掛載命令。演示name爲od,本地文件爲/root/onedrive,網盤目錄爲根目錄/的情況
rclone mount od:/ /root/onedrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000
4、回車後會運行,切換會主操作界面用ctrl+a+d
其他命令:
顯示所有會話:
screen -ls
恢復一個會話:
screen -r 會話名
如果上面的無法恢復,使用
screen -d -r 會話名
注:如在會話中輸入exit,將會退出,會話將不存在