Linux系统命令安装wireguard客户端

技术资料 分享,Linux
0 1199
admin
admin 自由达人 2024-04-08 21:16:37
用户等级:5级

Ubuntu


$ sudo apt install wireguard


Debian


# apt install wireguard


Fedora


$ sudo dnf install wireguard-tools

Mageia


$ sudo urpmi wireguard-tools


Arch


$ sudo pacman -S wireguard-tools


OpenSUSE/SLE


$ sudo zypper install wireguard-tools


Slackware


$ sudo slackpkg install wireguard-tools


Alpine


# apk add -U wireguard-tools


Gentoo


# emerge wireguard-tools


Exherbo


# cave resolve -x wireguard


NixOS


boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
environment.systemPackages = [ pkgs.wireguard pkgs.wireguard-tools ];


Nix on Darwin


$ nix-env -iA nixpkgs.wireguard-tools


OpenWRT


# opkg install wireguard


Oracle Linux 8


# dnf install oraclelinux-developer-release-el8
# dnf config-manager --disable ol8_developer
# dnf config-manager --enable ol8_developer_UEKR6
# dnf config-manager --save --setopt=ol8_developer_UEKR6.includepkgs='wireguard-tools*'
# dnf install wireguard-tools


Red Hat Enterprise Linux 8


Method 1: the easiest way is via ELRepo's pre-built module:


$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
$ sudo yum install kmod-wireguard wireguard-tools


Method 2: users running non-standard kernels may wish to use the DKMS package instead:


$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
$ sudo yum copr enable jdoss/wireguard
$ sudo yum install wireguard-dkms wireguard-tools


CentOS 8


Method 1: a signed module is available as built-in to CentOS's kernel-plus:


$ sudo yum install yum-utils epel-release
$ sudo yum-config-manager --setopt=centosplus.includepkgs="kernel-plus, kernel-plus-*" --setopt=centosplus.enabled=1 --save
$ sudo sed -e 's/^DEFAULTKERNEL=kernel-core$/DEFAULTKERNEL=kernel-plus-core/' -i /etc/sysconfig/kernel
$ sudo yum install kernel-plus wireguard-tools
$ sudo reboot


Method 2: the easiest way is via ELRepo's pre-built module:


$ sudo yum install elrepo-release epel-release
$ sudo yum install kmod-wireguard wireguard-tools


Method 3: users running non-standard kernels may wish to use the DKMS package instead:


$ sudo yum install epel-release
$ sudo yum config-manager --set-enabled PowerTools
$ sudo yum copr enable jdoss/wireguard
$ sudo yum install wireguard-dkms wireguard-tools


Oracle Linux 7


# yum install oraclelinux-developer-release-el7
# yum-config-manager --disable ol7_developer
# yum-config-manager --enable ol7_developer_UEKR6
# yum-config-manager --save --setopt=ol7_developer_UEKR6.includepkgs='wireguard-tools*'
# yum install wireguard-tools


Red Hat Enterprise Linux 7


Method 1: the easiest way is via ELRepo's pre-built module:


$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
$ sudo yum install kmod-wireguard wireguard-tools


Method 2: users running non-standard kernels may wish to use the DKMS package instead:


$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo curl -o /etc/yum.repos.d/jdoss-wireguard-epel-7.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
$ sudo yum install wireguard-dkms wireguard-tools


CentOS 7


Method 1: a signed module is available as built-in to CentOS's kernel-plus:


$ sudo yum install yum-utils epel-release
$ sudo yum-config-manager --setopt=centosplus.includepkgs=kernel-plus --enablerepo=centosplus --save
$ sudo sed -e 's/^DEFAULTKERNEL=kernel$/DEFAULTKERNEL=kernel-plus/' -i /etc/sysconfig/kernel
$ sudo yum install kernel-plus wireguard-tools
$ sudo reboot


Method 2: users wishing to stick with the standard kernel may use ELRepo's pre-built module:


$ sudo yum install epel-release elrepo-release
$ sudo yum install yum-plugin-elrepo
$ sudo yum install kmod-wireguard wireguard-tools


Method 3: users running non-standard kernels may wish to use the DKMS package instead:


$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo curl -o /etc/yum.repos.d/jdoss-wireguard-epel-7.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
$ sudo yum install wireguard-dkms wireguard-tools


FreeBSD


# pkg install wireguard


OpenBSD


# pkg_add wireguard-tools


Termux


# pkg install wireguard-tools


Void


# bps-install -S wireguard-tools wireguard-dkms


Adélie Linux


# apk add wireguard-tools wireguard-module


Source Mage


# cast wireguard-tools


Buildroot


BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
BR2_PACKAGE_WIREGUARD_TOOLS=y


EdgeOS


$ sudo dpkg -i wireguard-{type}-{version}.deb


AstLinux


BR2_PACKAGE_WIREGUARD_TOOLS=y
BR2_PACKAGE_WIREGUARD=y


Milis


# mps kur wireguard-tools wireguard-linux-compat


macOS Homebrew and MacPorts – Basic CLI


$ brew install wireguard-tools


or


$ port install wireguard-tools


本文章最后由 admin2024-04-08 21:17 编辑
楼主签名:唱跳rap和篮球
回帖
回复列表