• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

wg: command not found

by Deepika

WireGuard is a modern and lightweight VPN (Virtual Private Network) protocol that aims to provide better security and performance than traditional VPN protocols such as OpenVPN and IPsec. It uses state-of-the-art cryptography and is designed to be fast, simple, and easy to use.

The “wg” command-line tool is used to manage the configuration of WireGuard interfaces. It allows you to create and configure WireGuard tunnels, add and remove peers (i.e., other devices or networks that you want to connect to), and set various parameters such as IP addresses, port numbers, and cryptographic keys.

With the “wg” tool, you can easily set up a secure and fast VPN connection between two or more devices or networks. For example, you can use WireGuard to connect your laptop or mobile device to your home network, so that you can access your files, printers, and other resources remotely, or to connect two remote networks together to share resources and collaborate more effectively.

The WireGuard protocol is supported by a wide range of platforms, including Linux, Windows, macOS, iOS, Android, and even some routers and NAS devices. Its simplicity and high performance make it an attractive option for anyone who needs to set up a VPN quickly and easily without sacrificing security or speed.

To get started with WireGuard, you can follow the Quick Start guide on the WireGuard website, which provides step-by-step instructions for setting up a basic WireGuard configuration on Linux.

If you encounter the below error while running the command wg:

wg: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install wireguard-tools
Arch Linux pacman -S wireguard-tools
Kali Linux apt-get install wireguard-tools
OSX brew install wireguard-tools

wg Command Examples

1. Check status of currently active interfaces:

# wg

2. Generate a new private key:

# wg genkey

3. Generate a public key from a private key:

# wg pubkey  path/to/public_key

4. Generate a public and private key:

# wg genkey | tee path/to/private_key | wg pubkey > path/to/public_key

5. Show the current configuration of a wireguard interface:

# wg showconf wg0

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to make CentOS/RHEL 7 FIPS 140-2 compliant
  2. CentOS / RHEL 7 : How to configure VLAN Tagging using nmcli
  3. netstat: command not found
  4. sesearch: command not found
  5. How to calculate recommended value of vm.min_free_kbytes Kernel Tuning Parameter
  6. asar – A file archiver for the Electron platform (Command Examples)
  7. ss: command not found
  8. loadkeys: command not found
  9. How to install rsyslog7 when rsyslog5 is already installed in CentOS/RHEL
  10. visudo: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright