文章目录[隐藏]

话不多说直接上干货

教程开始:

复制并粘贴以下命令以做准备安装qBittorrent

mkdir -p ~/bin

这一步可自行挑选版本,自行复制对应喜欢的qb版本到wget命令后面,这里我选择4.3.9版本作为演示,可默认使用我的选择。
qbittorrent-nox-static版本选择

wget https://github.com/userdocs/qbittorrent-nox-static/releases/download/release-4.3.9_v1.2.14/x86_64-qbittorrent-nox
mv x86_64-qbittorrent-nox ~/bin/
chmod +x ~/bin/x86_64-qbittorrent-nox

修改~/bin/x86_64-qbittorrent-nox下为qbittorrent-nox

cd ~/bin
mv x86_64-qbittorrent-nox qbittorrent-nox

qBittorrent启动之前进行配置
输入

mkdir -p ~/.config/qBittorrent && nano ~/.config/qBittorrent/qBittorrent.conf

粘贴以下命令

[LegalNotice]
Accepted=true

[Preferences]
General\Locale=en_GB
WebUI\Port=8080
Downloads\SavePath=private/qBittorrent/data

完成后按住ctrl+x保存。按y确认

ps:想改端口可以参考这个命令

sed -i "s|Port=8080|Port=port|g" ~/.config/qBittorrent/qBittorrent.conf

开始

screen -dmS qBittorrent ~/bin/qbittorrent-nox

检查运行

pgrep -fu "$(whoami)" "qbittorrent-nox"

停止

pkill -fu "$(whoami)" 'qbittorrent-nox'

重新开始

pkill -fu "$(whoami)" '/qbittorrent-nox'; sleep 3 && screen -dmS qBittorrent ~/bin/qbittorrent-nox

杀死(强行停止)

pkill -9 -fu "$(whoami)" 'qbittorrent-nox'

安装启动完毕获取web网址链接

echo "http://$(whoami).$(hostname -f):$(sed -rn 's|WebUI\\Port=||p' ~/.config/qBittorrent/qBittorrent.conf)"

这下就可以愉快的玩耍去吧~