Connecting to a Wi-Fi network on Ubuntu Server can be a bit tricky since it doesn't come with a graphical user interface (GUI) by default. However, with the help of the terminal, you can easily configure your Wi-Fi settings. In this guide, we will explore two methods to connect to a Wi-Fi network on Ubuntu Server: using the netplan configuration files and the alternative method during the OS installation.


Method 1: Using Netplan Configuration Files


1. Open the Configuration File:

To begin, open the terminal and enter the following command to modify the netplan configuration file with sudo privileges:
```
sudo vim /etc/netplan/00-installer-config.yaml
```

2. Update the Configuration:

Replace the contents of the configuration file with the template below, making sure to customize the details according to your network setup:
```yaml
network:
  version: 2 
  wifis:
    wlp0s20f3:
      access-points:
        Mywifi1:
          password: G4XJdbuBVsQeq6Rz
        Mywifi2:
          password: uRK46vdoA76iCNBY
      dhcp4: true
```

3. Save and Close the File:

After updating the configuration, save the changes and exit Vim. Remember to adhere to YAML's strict indentation rules for proper formatting.

4. Apply the Changes:

To apply the changes you made, use the netplan utility by running the following command:
```
sudo netplan apply
```
Alternatively, you can reboot your system, and the changes will be automatically applied upon startup.

Method 2: Configuring Wi-Fi During OS Installation


1. Installation Process:

During the Ubuntu Server installation, when you reach the Network Connection page, click the "Create bond" button. Follow the on-screen prompts to configure your Wi-Fi interface.

Additional Option: Using nmcli Utility

On most Linux desktops, including Ubuntu, you can also use the nmcli utility to connect to Wi-Fi from the terminal. This tool provides a convenient command-line interface for managing network connections.

Conclusion:
Connecting to a Wi-Fi network on Ubuntu Server is easily achievable through the terminal. By modifying the netplan configuration files or configuring Wi-Fi during the OS installation, you can establish a stable and secure connection. Additionally, the nmcli utility offers an alternative approach for managing network connections. With these methods at your disposal, you can confidently configure your Wi-Fi on Ubuntu Server.