How to set clash for linux
Clash tools was deleted yesterday.
But don’t worry, I already find a new repo:
This guy just push a new repo.
- Download the latest linux verison clash-linux-amd64-v3-v1.18.0.gz
#extract the package:
gunzip clash-linux-amd64-v3-v1.18.0.gz
# you will get clash-linux-amd64-v3-v1.18.0
# mv it to where you want, for me, i make a new directory in home
mkdir -p /home/xxxx/net-tool
mv ~/path/to/your/clash/clash-linux-amd64-v3-v1.18.0 /home/xxxx/net-tool/clash
# add execution to the clash:
chmod +x /home/xxxx/net-tool/clash
- Try to run and get the configuration files
# run it
./clash
# it will report error, donot worry, just ctrl c
# you can get some files in ~/.config/clash/
ls ~/.config/clash/
Country.mmdb, config.yaml, cache.db
# config.yaml is the configuration file you need to update, just get the file from you provider you paid to buy(wget your-subscription address)
# mv the new config.yaml to this folder
- Config clash.service
sudo vim /etc/systemd/system/clash.service
# add following text in the file:
[Unit]
Description = Clash Daemon
[Service]
ExecStart=/home/xxxxx/net-tool/clash -d /home/xxxx/.config/clash/
Restart=on-failure
[Install]
WantedBy=multi-user.target
- Enable service
sudo systemctl enable clash.service
- Start the service
sudo systemctl start clash.service
All done, you can use the 127.0.0.1:7890 to access your clash proxy. Have fun.