OPERATING SYSTEMSOS Linux

How to Connect a Ubuntu Server System to a Wi-Fi Network

In this video, I show you how to connect a system running Ubuntu Server to a Wi-Fi network.

Links:
Ubuntu Packages: https://packages.ubuntu.com/

Commands:
chmod 777 -R [path to directory] (example: chmod 777 -R /media/drew/writable): Recursively changes the permissions of a directory to make it writable.
mount [path to storage volume] [mount point] (example: mount /dev/sda3 /mnt): Mounts a storage volume to the specified mount point.
umount [path to storage volume] (example: umount /dev/sda3): Unmounts a storage volume (sorry for not mentioning that in this video).
cd [path to directory] (example: cd /etc/netplan): Changes the active directory in the shell.
ls: Lists the contents of the active directory.
dpkg -i *: Installs all packages in the active directory.
rm [path to file] (example: rm 50-cloud-init.yaml.dist-subiquity): Permanently deletes a file.
nano [path to file] (example: nano 00-installer-config.yaml): Allows you to edit a plain text file.
netplan generate: Generates the network configuration for your Ubuntu server based on your Netplan configuration file, and checks for errors in your Netplan configuration file in the process.
netplan apply: Applies your network configuration.

*If you get a “permission denied” error when attempting to run any of the above commands, just add “sudo” to the beginning of the command (like this: sudo dpkg -i *), and try again.

Sample Netplan Configuration File:
network:
version: 2
wifis:
wlp1s0:
dhcp4: no
addresses: [192.168.0.101/24]
nameservers:
addresses: [1.1.1.1, 1.0.0.1]
access-points:
‘Network Name’:
password: ‘Wi-Fi Password’
routes:
– to: default
via: 192.168.0.1

source

ubuntu

43 thoughts on “How to Connect a Ubuntu Server System to a Wi-Fi Network

  • *If you get a "permission denied" error when attempting to run any of the commands in this video, just add "sudo" to the beginning of the command (like this: sudo dpkg -i *), and try again.

    Also “gateway4” is deprecated. Refer to the sample netplan configuration for an updated example.

  • thanks my brooooooooooooo… u saved my time and efforts!..yeaaaaaaaaaaaa

  • ok so i am setting up this …. netplan apply worked fine but am trying to use dhcp4 …. still would not connect … any idea why?

  • Hi, I only have the 50-cloud-init.yaml file in my netplan directory. Please can you help me.

  • Hi bro, when i type the "ip a" or "lsblk" commands, I'm not seeing any network interface related to ethernet or wifi, what to do please help, I'm lost here😢 i installed Ubuntu 20.04.4 recently.

    Hope you can guide me here.

  • I can't use static IP because when I try to use it the WiFi just doesn't work

  • First I was having issue where my wifi card wasnt being read so after searching a lot i installed the drivers and it got read and now I am having “Temporary failure in name resolution when setting up” i am having these problem for days now and i am stuck on this , i tried both with dhcp on and tried to reserved ip in the routers page but its not happening and also with dhcp off still its giving the same issue , please anyone can help me on discord or my home server project would end up failing 😢

  • There are no mirrors and I need a x86_64 architecture file and there are none in using codename jammy

  • there are errors encountered while processing the wpasupplicant…deb and stuff isn't working properly, what should i do ?

  • one thing that happens to me is that after ubuntu installation I have to do all the yaml configuration file again(removing other file and editing the config).

  • A doubt, how to write on usb boot using windows? I dint find how to do that.

  • Thank you Drew my case is : install ubuntu server on a oracle VM, connect it to wifi.

  • UHHHH Now i have my server back. really makes you appreciate gui *click click*. I got some warnings: Permissions for *.yaml are too open …, and gateway4 has been deprecated. The server still connects to to WiFi so i will consider that a win. Thank you Linux wizard!

  • Hi, is it possible to enable multiple wi-fi connections so you can swap between them from time to time?

  • Hey i have a problame i dont have the writable folder

  • Worked for me fine, had to look up how to mount a usb on another vid since I'm a beginner but hey it worked like a charm, thanks!

  • You can use USB Tethering from your Smartphone and download all wifi stuff

  • Great video. Thanks for your help and time, It is appreciated. Your tutorial is the only one out of dozens that actually helped me.

  • Not sure if you're able to help but as of 22.04 the gateway4 setting has been deprecated and no longer works.

  • I don't know if you still monitor the comments on this video, but when i followed you to the ubuntu packages website, i was unable to download the wpa supplicant from any of the mirrors, as in, when i clicked on the link to download the files, nothing would happen. what do i do?

  • You tell us to use ip a to get the name for the wireless network card, it doesn't say whats mine so I want to see the solution in your video, but it doesn't even tell what is yours? How can I find mine than if you don't show it?

  • ping didn't worked. Maybe I've downloaded wrong files? I've download the AMD64 and my processor is a Intel Celeron

  • Thank you, your video helped me so much! Also I had some trouble with laptop wifi driver – there were no network interfaces except lo, so I connect by Ethernet to download them using apt install. After that, your settings for netplan config worked great.

  • If one is using dhcp4 is it necessary to insert DNS information?

  • did you do this for the latest ubuntu server ?

  • Awesome,but i stick at indentation error, more than 4 days now trying , seems no hope

Comments are closed.