There are some great answers here, but many are out of date. Since May 2016, Raspbian has been able to copy wifi details from /boot/wpa_supplicant.conf into /etc/wpa_supplicant/wpa_supplicant.conf to automatically configure wireless network access:
If a wpa_supplicant.conf file is placed into the /boot/ directory, this will be moved to the /etc/...
Draws very little power
Can be used for a number of server tasks that imply continuous uptime, eg. DHCP server
Few people seem to have had issues through running them this way (and the passage of time is now definitely at a point where this is worth noting)
Historically, there were a few negatives I could think of, I'll leave them here for ...
All you need is to place an empty file named 'ssh' onto the boot (FAT) partition of your SD card (no need to mount ext3). Tested with 2016-11-25-raspbian-jessie-lite.img.
More info about Nov '16 security update: https://www.raspberrypi.org/blog/a-security-update-for-raspbian-pixel/
TL;DR or "Just scorch my pi"
sudo apt-get remove --auto-remove --purge 'libx11-.*'
sudo apt-get autoremove --purge
(Repeat apt-get autoremove --purge until no orphans remain)
If a package foo depends on another package libfoo and you remove the libfoo package, the dependent (foo) is also removed. Because Foo has a depends line ...
I'm finding that the Pi makes a very good microserver, as long as you understand its limitations. While flash memory in theory has a limited life, in practice you'll get several years out of it. I've been running a similar ARM-based board as a home server for over three years with / and /home on an SD card, and it hasn't complained.
The biggest issue I have ...
To enable ssh at startup, backup boot.rc on the boot partition on the SD image and replace it with boot_enable_ssh.rc
I don't know about your router, but you may be able to configure it to reserve a fixed IP address for the MAC address of your Pi.
Copy boot_enable_ssh.rc to boot.rc from /boot in the Raspberry Pi's rootfs (SD card)
Still in the Raspberry Pi's rootfs, edit /etc/network/interfaces in order to have a fixed IP address assigned (so no DHCP server is needed). For example,
auto lo eth0
iface lo inet loopback
iface eth0 inet static
You can see bootup messages by connecting to the UART on pin 14/15 of the GPIO port
Here is how to connect it to one of the PL2303 UARTs that can be found on ebay for a few dollars.
I didn't need to connect GND because I am powering the RPi from a USB port on the same computer.
If you just want to see the boot messages, you'd only need the orange wire. If ...
Do not simply unplug the cord, as this could occasionally (perhaps, often) lead to filesystem corruption.
As Impluss says, use shutdown. I recently ran across a tip about configuring udev to trigger shutdown or reboot when a specific usb device is unplugged. This is useful if the system has become unresponsive or has lost a network connection and you can'...
None of the boot_enable_ssh.rc stuff exists in current Raspian builds. You boot, a nice graphical menu gives you some options (including whether SSHD should load at boot) and then dumps you out on a command line.
That's great if... you're a graphical user.
If you're not, you're left in the position where you have to somehow externally run update-rc.d. All ...
I have been running mine for about 3 months non-stop as a web server for www.sm0vpo.com where there are about 10,000 electronic PDF files and about 250 electronic projects that i have fully documented with PCB poil patters in ZIP and GIF form.
I have about 3,000,000 hits per year so my little RPi will have seen about 700,000 hits as well as experiencig both ...
Yes, there are logs for everything.
If you connect a new device to the Pi then the module being loaded will show in dmesg. Eg;
$ dmesg | tail
[16037.102139] Initializing USB Mass Storage driver...
[16037.102299] scsi4 : usb-storage 2-2:1.0
[16037.102422] usbcore: registered new interface driver usb-storage
[16037.102425] USB Mass Storage support ...
For my own experience, I have had my RaspPi running since June 24/7 logging data from my solar system and haven't had any problems. Im using a DC-DC converter for power via the 12V solar system and fitted a cooling fan on the box but it hasn't got hot enough to turn on yet.
I am not writing to the SD card so that will hopefully not be a point of failure, ...
Since most computers are not suited for 24/7 operations due to their moving parts the RPi shouldn't have any problems.
If a machine fails it's most of the time due to a hard drive failing or some fans failing as those are prone to wear.
The only thing that can experience wear like that on a RPi is the SD Card so you might want your setup to get as much of ...
The default Raspbian /etc/network/interfaces configuration does not connect to WiFi on boot. The key lines of the interfaces man-page are:
Lines beginning with the word "auto" are used to identify the
physical interfaces to be brought up when ifup is run with the
-a option. (This option is used by the system boot scripts.)
If you use Arch Linux distribution, you just plug it in and wait for it to get its address assigned from a DHCP server. You can then check the DHCP's status (by connecting to your router for example) and retrieve the IP address from connected clients list. If that fails, you can use nmap or similar tools to scan the entire subnet for open port 22 (SSH is ...
ssh is installed but not started by default on runlevel 2,
the default for raspbian.
Rename /etc/rc2.d/ssh/K??ssh to /etc/rc2.d/ssh/S02ssh
The sd card comes with 2 partitions. The 1st is vfat; the 2nd is ext3. You need some utility to access it from macosx.
1st google result for ext2 macosx:
I was also eager to know more about the 24/7 capabilities of the Raspberry Pi. Therefore, I installed the app "stress" (sudo apt-get install stress), which is capable of loading the CPU for the full 100% all the time.
The best thing about "stress" is that it gives priority to other running processes, it only "fills" the gap till the CPU is loaded for the ...
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 just need to create a file in the boot partition (not the directory within the root filesystem) called ssh. To check if you're in the right partition, it ...
I had the same issues using the wheezy image.
The goal is to have the Pi boot up so you can ssh into it from another system, without having to ever connect a monitor and keyboard.
The problem is that while the SSH service is enabled, as noted above, it hasn't been configured yet, so you can't connect even if networking is running. Here are the tasks to ...
Raspberry Pi 3 (kernel 4.14.30-v7+)
This post is a collection of notes and tutorials I have used for setting up wireless connections to the Raspberry Pi.
Please let me know if you experience any issues.
Raspbian currently looks in the boot partition for a couple files to allow a headless set-up or connect a Raspberry Pi to a network and ...
If you want your SD card to last for longer I have got two pieces of advice for you:
Make sure you don't have too many write cycles, ie. turn off logging, don't run a Bitcoin node, etc.
Buy a good brand (ocz/kingston/a-data and other popular ones are fine, just not chinese no-names)
When I did not follow those two mentioned above my memory cards on ...
Using the Debian 7 (Wheezy) beta image, SSH is installed and enabled by default. You just need to connect to it via its IP address.
There are a few ways to work out what IP address the Raspberry Pi is on without having to run ifconfig on it directly, for example:
Your router configuration pages may have a screen stating IP addresses for machines connected
The easy way (if you have just a keyboard)
SSH is not enabled by default in Debian Wheezy (Raspbian). Once upon a time, SSH was definitely not enabled on my Raspbian images. Apparently SSH is enabled by default now. But if it's not and you're stuck, read on:
Enabling it is very simple, a lot simpler than most of the answers I've seen here, if you have a ...
I can only offer a view based on my experience. I use 2 raspberry pi's as mini servers and never turn them off. My first Pi is now well over 4 months old and has probably been 'off' for less than a few hours during all that time. I use it pretty heavily as an iPlayer download and podcast host, which does a reasonable amount of reads and writes of the SD ...
You can also try tcpdump, but that isn't as clear.
If you know the routers local IP address, type that into your browser and login.
From there, depending on your router, you'll have a different set of options with information about your network including all wireless devices connected to the routers.
Apple's time machine/airport express ...
Just to chime in with a datapoint:
I've used my raspberry as a datalogger for my solarpanels. It was writing to a logfile on the SDcard every minute. I've now had a hard failure of the SD card for the second time. Each time the card lasted about a month. The cards were both Kingston SDC4/4GB cards. So SDcard wear is real!