I'm trying to set up Ubuntu 22.04 Server on my old laptop, and I'm having trouble connecting to Wi-Fi. Whenever I try to open the netplan configuration file in any text editor like nano, vi, vim, or gedit, I get a "command not found" error. I could buy an Ethernet cable to solve the problem, but is there any other way to edit the netplan file and get Wi-Fi working?
2 Answers
Just a heads up: netplan is a tool, not just a plain text file. Normally, if you had a desktop environment, you could connect to Wi-Fi using a network icon. But since you're on a server, you can check your network devices using the command `ifconfig`. Your Wi-Fi device should show up, likely with a name like `wlp2s0`. From there, you can connect to your Wi-Fi with the command `nmcli device wifi connect password ` by replacing `` with your network name and `` with your Wi-Fi password. If your laptop is quite old, consider using Xubuntu since it has a lighter desktop environment, and can still function as a server!
It sounds like you might be using the minimal version of Ubuntu. First, check if vim.tiny is actually installed. Also, you can use the command line to make changes to the netplan file. You could use `sed` or even redirect output with `cat` or `echo` directly to the file instead of using a text editor. This way, you won’t need to rely on having a GUI.

You brought up some good points! Although the man page you mentioned talks about how to modify `/etc/netplan/config.yaml` and applying those changes with `sudo netplan apply`, it's true that if the OP doesn't have network-manager installed, there won't be a GUI option to edit network settings. Just thought I'd back you up on that!