309 votes
Accepted

Prepare SD card for Wifi on Headless Pi

There are some great answers here, but many are out of date. Even this one has aged somewhat. There are now (at least) two ways of doing this: 1: Raspberry Pi Imager The Raspberry Pi Foundation's ...
scruss's user avatar
  • 9,068
37 votes

How could one automate the raspbian raspi-config setup?

This is still not documented anywhere, but the rc_gui tool (I'm assuming it would be a graphical user interface to the raspi-config if I were to ever install the full desktop) uses command line ...
Bruno Bronosky's user avatar
37 votes
Accepted

How could one automate the raspbian raspi-config setup?

At least nowadays, raspi-config seems to support noninteractive mode: cat /boot/cmdline.txt # show original cmdline.txt raspi-config nonint do_serial 1 # disable serial console cat /boot/...
Silly Freak's user avatar
30 votes

How do I get the serial number?

/sys/firmware/devicetree/base/serial-number seems to be more universal nowadays. And it doesn't require any additional processing. # SN=$(cat /sys/firmware/devicetree/base/serial-number) # echo $SN ...
edo1's user avatar
  • 506
22 votes
Accepted

Set up a Raspberry Pi Zero W without monitor or ethernet module

That's a tough one. The WiFi won't automatically connect. So I would try the following: Image a micro SD card with the Raspbian OS image using Win32DiskImager. Manually configure your WiFi from ...
Ricardo's user avatar
  • 1,048
19 votes

How do I install an OS image onto an SD card?

There is a tool called Etcher for Windows, Linux, and Mac. It has a simple GUI. A screenshot from the website: (source: etcher.io)
geek1011's user avatar
  • 447
17 votes

Prepare for ssh without a screen

Following massive botnet attacks in 2016 due to IoT devices being easily hacked with default passwords, Raspbian once again comes with SSH turned off by default (source). The fix is pretty easy, you ...
raphael's user avatar
  • 298
16 votes

Set up a Raspberry Pi Zero W without monitor or ethernet module

You are looking for information on running "headless". There are details on this on the raspberry pi site. https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=161202 Basically put a file, ...
Will Allen's user avatar
15 votes

Prepare SD card for Wifi on Headless Pi

Since November 2016 SSH has been disabled by default in standard Raspbian images for security reasons. To re-enable it, create a blank file called either ssh or ssh.txt on the sd card boot folder ( ...
Mike Redrobe's user avatar
11 votes

Initial setup without a monitor or keyboard

For those of you running into this with the newer Raspbian images: there is a sshwitch systemd target, that checks for /boot/ssh, and if that file is present, it regenerates the SSH host keys and ...
Steffan Karger's user avatar
10 votes

Installing Raspbian from NOOBS without display

For a headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card. When the Pi boots, it looks for the ssh file. If it is found, SSH ...
philip mudenyo's user avatar
9 votes

Installing Raspbian from NOOBS without display

The short answer is, make sure you download the offline install version of NOOBS, then edit the file recovery.cmdline and add silentinstall on the end of the first line. That will auto install ...
Mike Redrobe's user avatar
9 votes
Accepted

Switch between AP and client mode

It is possible, I suggest you to use a lighttpd with a webservice for your app. After that - just switch between hostapd(AP mode) and wpa_supplicant(client mode). It is as simple as stop one service ...
Alexey Vesnin's user avatar
8 votes

How do I get the serial number?

NodeJS For anyone interested here is a way to get the Raspberry Serial Number using NodeJS: function getserial(){ var fs = require('fs'); var content = fs.readFileSync('/proc/cpuinfo', 'utf8');...
M. Martins's user avatar
8 votes

Set up a Raspberry Pi Zero W without monitor or ethernet module

You can drop in a wpa_supplicant.conf file in the boot directory before installing the SD Card into the Pi. When the Pi boots up, the file /etc/wpa_supplicant/wpa_supplicant.conf will be overwritten (...
Brian Warmerdam's user avatar
7 votes

Enable SSH in NOOBS before install

You just need to add a file named 'ssh' to the noobs partition (you can do it right when copying fresh noobs files to a clean sd card) and it will enable ssh for raspbian when you install it from this ...
nars's user avatar
  • 171
7 votes

Set up a Raspberry Pi Zero W without monitor or ethernet module

You can SSH in from USB after some configuration. This assumes you're not using NOOBS. Doing this with a NOOBS SD card is a little harder and (to my knowledge) impossible on Windows. First, the ...
anonymoose's user avatar
7 votes
Accepted

Is the SD card needed just to flash the Raspberry Pi, or does it need to remain in the device?

The Pi has no (usable) persistent memory. The SD card is used to perform the functions of the BIOS and hard disk drive of a standard PC. I.e. it is used to boot, hold system software, and store any ...
joan's user avatar
  • 71.1k
6 votes

What password to use to log in after the first boot?

Beware if you are using a German keyboard: In this case you have to use pi / raspberrz
Ray Hulha's user avatar
  • 169
6 votes
Accepted

Why is it necessary to "expand the file system"?

People are commonly confused by the difference between three distinct things: A random access block storage device such as an SD card (or HDD). A storage partition which is a section of a device; ...
goldilocks's user avatar
  • 58.9k
6 votes

How to set up Raspberry Pi without a microSD adapter?

No, you cannot set up Raspberry Pi without first writing an image of the operating system to the microSD card from which the device boots. Even if you had a memory card with a pre-installed system, ...
techraf's user avatar
  • 4,319
6 votes
Accepted

JAVA_HOME not working

Your JAVA_HOME points to a different directory than where your java executable is located. Per your question, the JAVA_HOME directory is: /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt whereas java is ...
Phil B.'s user avatar
  • 5,043
5 votes

Change default username

The answers above are correct, I just want to give another option that may suits you better. Assuming: A brand new raspberry pi You want to change the default username pi to mypie You want to adapt ...
DrBeco's user avatar
  • 241
5 votes

Installing Raspbian from NOOBS without display

I found this guide to be the most useful. An important update in setup: ssh is disabled by default on the newest images. You have to create a new file ssh in /boot (can be empty). E.g. touch /...
gameweld's user avatar
  • 151
5 votes
Accepted

How to change default username on Raspberry Pi when connected via ssh?

It seems you are trying to change the default user name to prevent nefarious ssh login attempts using the default username/password combo. IMO, the best way to prevent nefarious logins is to disable ...
honi's user avatar
  • 175
5 votes
Accepted

What is the best way to automate the generation of bootable SDcard images for Raspberry Pi projects?

Bart van Leeuwen pointed me to CustomPiOS as a nice solution: https://github.com/guysoft/CustomPiOS It may not work for my project, because it is bound to Raspbian (and I will need PiCore), and it ...
Martin Hepp's user avatar
4 votes

How could one automate the raspbian raspi-config setup?

All raspi-config does is editing a few configuration files, which you can also edit with a script. Check the sed manual to see how such edits can be efficiently done. If you have a lot of changes to ...
Dmitry Grigoryev's user avatar
4 votes

How do I install an OS image onto an SD card?

The Raspberry Pi Foundation now has their own image burning software called Raspberry Pi Imager. You can download it here: https://www.raspberrypi.org/downloads/
Paul's user avatar
  • 242
4 votes

Prepare for ssh without a screen

No router + no screen + regular Ethernet cable + RPI 2 + Raspbian Lite 2018-11-13 + Ubuntu 18.10 host First we must enable the SSH server on the Pi, which is disabled by default for security. If you ...
Ciro Santilli OurBigBook.com's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible