2023年10月12日星期四

群晖利用ipkg代替apt-get yum 安装 screen

 


1.进入ssh

  • 进入ssh后切换root
    1. sudo -i

2.安装ipkg

  1. wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh
  2. chmod +x syno-i686-bootstrap_1.2-7_i686.xsh
  3. sh syno-i686-bootstrap_1.2-7_i686.xsh
  4. ipkg update

3.安装screen

  1. ipkg install screen

screen常用命令

  • screen -S xxx建立一个名为xxx的作业
  • screen -ls 查看作业列表
  • screen -r xxx进入名为xxx的作业

或者利用nohup

  1. nohup xxx.sh > xxx.log 2>&1 &

在上面的例子中:

  • 2>&1是将标准错误(2)重定向到标准输出(&1),标准输出(&1)再被重定向输入到xxx.log文件中。
  • 最后的&指的后台运行

ps查看后台进程
kill杀死后台进程


转自

https://www.lucktang.com/3143.html

没有评论:

发表评论

openwrt在线编译 插件名字查找

openwrt在线编译 https://firmware-selector.staging.immortalwrt.org/ 插件名字查找 https://downloads.staging.immortalwrt.org/releases/23.05.1/packages/x8...