TransWikia.com

Headless Ubuntu setup w/o keyboard

Ask Ubuntu Asked by Michael Allen on February 19, 2021

So I’m wanting to setup Ubuntu on my Raspberry Pi 4b. and I don’t have access to a USB keyboard at the moment. So, I know you can add ssh to the boot directory and do a complete headless setup but … You have to be in the network obviously. Without an Ethernet cable is that a way to auto config to a wlan by adding a text file? Like with ssh. I have a laptop with an SD card reader.

Follow up question: if the answer is yes, can I do this after I already attempted to boot or do I need to reflash the sdcard and add the file prior to first boot?

One Answer

Have a look in the system folder that gets created when you've made the SD card. There's a file called "network". Open this up and add your WiFi credentials.

It's important that you do this on the first boot, as this file is only read on initial boot.

When the pi is up running you'll be able to find the device IP on the network through the router or by running nmap. If you want to use nmap you'll simply install it with apt install nmap and then

nmap -sn "router gateway"/24

When you've located the device and the IP you'll be able to ssh into it with the username and password ubuntu, e.g.

ssh ubuntu@ip-address

You'll be asked to change password on first login.

Correct answer by Joachim on February 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP