306
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 ...
36
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 ...
35
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/...
25
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
...
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 ...
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)
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 ...
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, ...
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 ( ...
11
votes
Accepted
Do You HAVE To Use SDFormatter Before Installing NOOBS?
There is no requirement to use the tool provided by the SD Association. Formatting the card in Windows using the Windows formatter may also work.
However, there is a strong recommendation to use the ...
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 ...
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 ...
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 ...
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 ...
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');...
8
votes
How do I find out the IP address of my Pi?
You don't mention which OS you are using, but there area couple of ways to do this:
You can try ssh pi@raspberrypi or ssh raspberrypi.local (this will may need to be adjusted if not using Raspbian - ...
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 (...
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 ...
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 ...
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 ...
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
6
votes
Is it possible to build a Raspberry Pi yourself?
If your idea is to make an exact carbon copy of the Pi 2, you won't succeed.
While @joan stated that the OTP contents are not shared to the public, the actual SoC is also not available. The BCM2836 ...
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; ...
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, ...
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 ...
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 /...
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 ...
5
votes
Do You HAVE To Use SDFormatter Before Installing NOOBS?
Perhaps I have been fortunate, but I have had no problems using SD cards that are brand new nor older cards that have been reformatted.
Thus, to answer the question as posed, NO you don't HAVE to, ...
5
votes
Accepted
Initial setup without a monitor or keyboard
The official docs state that sshd runs by default
On the latest image I have, 2015-11-21-raspbian-jessie-lite.img, this is not true. Debian/Raspbian jessie currently uses systemd for init, but there ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
setup × 210ssh × 25
raspbian × 22
operating-systems × 18
boot × 16
noobs × 16
networking × 15
sd-card × 15
headless × 15
wifi × 14
ethernet × 11
pi-3 × 10
hardware × 10
display × 10
screen × 9
usb × 8
keyboard × 7
hdmi × 6
wireless × 6
software-installation × 6
settings × 6
pi-2 × 5
pi-zero-w × 5
windows × 5
server × 5