CentOS下Copier Launcher的使用指南
Copier Launcher的安装需根据其具体类型(命令行工具或系统服务)选择对应方式:
作为命令行工具(快速复制文件/目录)
若需使用copier命令复制文件并保留属性(如权限、时间戳),可通过以下步骤安装:
sudo yum update -y
sudo yum install epel-release -y
copier工具:sudo yum install copier -y
pip安装(适用于Python环境):sudo yum install python3-pip -y
sudo pip3 install copier
作为系统服务(如Copilot Launcher)
若为Visual Studio Code的Copilot Launcher(用于代码补全),需通过以下步骤安装:
sudo rpm -i code-*.rpm。命令行工具(copier)
cop(若系统识别别名)或完整命令copier即可启动。cop help(如open启动应用、list查看已安装应用)。系统服务(如Copilot Launcher)
/usr/local/bin/cop-launcher或/opt/cop-launcher/bin/cop-launcher),直接运行:/usr/local/bin/cop-launcher
sudo nano /etc/systemd/system/cop-launcher.service,添加以下内容:[Unit]
Description=Cop Launcher Service
After=network.target
[Service]
ExecStart=/usr/local/bin/cop-launcher
Restart=always
User=nobody
Group=nogroup
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable cop-launcher.service
sudo systemctl start cop-launcher.service
sudo systemctl status cop-launcher.service。命令行工具(copier)
cop open firefox。cop list。~/.config/copier/config.yaml):shortcuts:
gedit:
key: "Ctrl+Alt+G"
command: "gedit"
保存后,可通过Ctrl+Alt+G快速启动gedit。系统服务(如Copilot Launcher)
sudo systemctl stop copilot。sudo systemctl disable copilot。sudo提升权限(如sudo copier)。