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,将会退出,会话将不存在