Hot answers tagged

312

Open Terminal and type: cat /etc/os-release This results in the following output on my Raspberry Pi 2... PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www....


28

The other solutions here did not work for me (fresh Raspbian, boot to GUI). Instead, this worked: Open up /etc/lightdm/lightdm.conf using your favorite text editor (I prefer nano). Look for the line #xserver-command=X. Change it to xserver-command=X -s 0 dpms It should be at line 87 if things don't change. Save and reboot. Source


25

Do not look at uname -a. That just shows kernel version. To find the distribution version, run: sudo apt-get install lsb-release lsb_release -a My RPi shows: No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.8 (wheezy) Release: 7.8 Codename: wheezy


23

https://github.com/RPi-Distro/pi-gen/releases lists releases of Raspbian since 2016-05-10. To find your Raspbian distribution image release date (not the /etc/os-release information such as VERSION="8 (jessie)") on a running system: $ cat /etc/rpi-issue Raspberry Pi reference 2016-05-10 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, ...


21

The accepted answer is correct, but a really simple method is: dpkg --print-architecture If your system is using a hard float architecture, you will then see: armhf ARM Hard Float. :-)


21

As @Milliways commented here is where the power of systemd comes to play. There is no need to wait that sequential processed commands are finished. systemd is working parallel (that is what it makes a bit unfamiliar). It can start services after other services are started. Because this "network-up thing" is a very common problem, we have a nice service for ...


18

The Gammu documentation suggests (but doesn't go into any detail of) a workaround, Edit: Atmel has an Application Note that nicely describes the enumeration process. Enumeration changes because it happens in a conversation between host, hub and device, and response timing from each of these may vary, even if the setup is identical from one reboot to the ...


16

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 ...


15

Assuming you're using Raspbian, you need to find out which .deb file you need, and transfer those to your Raspberry Pi, and place them in /var/cache/apt/archives/partial, and then just use the command: sudo dpkg -i /var/cache/apt/archives/partial/xxxx where xxxx is the exact name of the .deb file you want to install If you need to find dependencies, http:/...


15

I have since learnt that the Raspberry Pi foundation uses this repository for generating their images: https://github.com/RPi-Distro/pi-gen This can be modified to create an image as desired.


14

I think @Jivings answer may be better, but I have it in my notes to do this: Install apt-get install x11-xserver-utils Edit /etc/xdg/lxsession/LXDE/autostart Append these lines: @xset s noblank @xset s off @xset -dpms Possibly also comment out the line that says @xscreensaver -no-splash, so the complete file should look something like this: @lxpanel --...


13

CA certificates are located in /etc/ssl/certs as well as /usr/share/ca-certificates/ and in some cases /usr/local/share/certificates. In general CA certs should not be manually added to the local trust store. There are reasons why certain CAs are not included. Without further research, it's unclear why this particular CA root cert was not included in ...


12

This worked for me sudo nano /etc/network/interfaces and add the following lines auto wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf sudo nano /etc/wpa_supplicant/wpa_supplicant.conf file looks like this country=GB ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="your ssid" psk="...


10

To prevent the screen from going blank try adding consoleblank=0 to the end of the first line of /boot/cmdline.txt Source


9

The shell interprets and handles redirection before the command is executed. So the redirection (>/sys/class/leds/led0/trigger) is attempted with the user's permissions, thus fails. The generally recognized solution is to use the tee command: (man page and wikipedia) echo heartbeat | sudo tee /sys/class/leds/led0/trigger >/dev/null The tee command ...


8

To install programs on machine unable to access internet enter command as normal and read output look towards end of results for the failed to fetch lines and enter these links into a web capable machine, save the links to a usb memory stick. Repeat for all failed to fetch lines *pi@raspberrypi ~/pi $ sudo apt-get install scrot Reading package lists... ...


8

You've partially answered your own question, but there is another way of doing it, especially for serial devices: the /dev/serial/* paths. I have a Prolific USB→RS232 interface on my Raspberry Pi which almost invariably shows up as /dev/ttyUSB0. But it also appears on the system as: /dev/serial/by-path/platform-bcm2708_usb-usb-0:1.3:1.0-port0 /dev/serial/by-...


8

Is there a command that I can run to clean up (uninstall) all non essential packages No, since "non-essential" is hugely subjective. If you mean, the bare minimum to have a running system, then that wouldn't include things that make it a "server". If you mean, just the bare minimum plus whatever you need to make it a server, this begs the question, "What ...


7

For better boot times, update the firmware (with rpi-update), install the system with hard-floats and keep it updated. Older firmware are usually slower, hard-floats increase a lot the system speed, every day there are more optimization for arm, specially for rpi


7

I was able to install pcscd daemon and using pcsc-lite wrapper in NodeJS on Raspbian (Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux) using Raspberry Pi B+ and Raspberry Pi 2. Here an extract of the Requirements installation from the full guide of mine project on GitHub: Install PC/SC and libnfc (...


7

Based on the name HASSbian, you are likely on a Debian derivative. You can get the name of the distrubution with the following command line command: cat /etc/*-release Note this will likely return HASSbian. However if you look at the VERSION line it will likely return Jessie or Wheezy (these are Debian releases). Assuming my assumption is correct you ...


6

You have to define which display to use first : export DISPLAY=:0 xset s reset Hope this helps


6

I assume you want the script to run on boot, but without having to log in. There are many ways to do this, but you could just put your code into rc.local NOTE You do not need sudo, as the startup code is running as root. You cannot edit etc/rc.local directly as it is owned by root; make a copy to edit and replace the original (with the correct permissions)...


6

you may use "--warning=no-timestamp" to skip the timestamp check and allow full extraction of your archive (see http://www.gnu.org/software/tar/manual/html_section/warnings.html for details). however, that kind of error usually happens with corrupt archives, you'd better double check if all MD5/SHA checksums are correct and if your /boot folder really has ...


6

Is running "reboot" command enough to reliably restart the Raspian (Debian) system if filesystem/hdd is ok? From the man page for reboot: When called with --force or when in runlevel 0 or 6, this tool invokes the reboot(2) system call itself and directly reboots the system. Otherwise this simply invokes the shutdown(8) tool with the appropriate ...


6

As explained by lornix it's because the shell handles redirection before the command is executed. I prefer this type of invocation sudo sh -c "echo 4 >/sys/class/gpio/export" In your case sudo echo heartbeat >/sys/class/leds/led0/trigger would become sudo sh -c "echo heartbeat >/sys/class/leds/led0/trigger"


6

No for at least a couple of reasons. Distribution ISOs tend to be solely INTEL/AMD CPU based, not ARM as used by the PI. The Raspberry Pi is an ARMv6 architecture. The major distributions only support more recent architectures (although Debian, at least, support ARMv6 with soft float packages). Similar reasoning may be applied to the other boards you ...


6

Not unless you have a 64 bit version compiled for the ARM architecture. You can't install the AMD64 or x86-64 version as the architecture is different. Quoting from the Pi Foundation's blog post announcing the Pi3: At launch, we are using the same 32-bit Raspbian userland that we use on other Raspberry Pi devices; over the next few months we will ...


6

You're correct that you can't add a build-dependency on libraspberrypi-dev to the Debian package, since there is no such package in Debian. You can't even limit the build-dependency to an architecture since both Debian and Raspbian use armhf (albeit with slightly different definitions). Technically, it should be possible to provide a Raspbian-specific ...


6

From the tutorial you linked to: MongoDB only provides packages for 64-bit builds of Debian 7 and 8. Although the Pi3 has a 64-bit processor, Raspbian is only a 32-bit OS. Also, see this related question.


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