109
votes
Accepted
Which model Raspberry Pi I am running?
cat /proc/device-tree/model
returns something like
Raspberry Pi 3 Model B Rev 1.2
50
votes
Open chromium full screen on start up
Edit this file
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
And add this:
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk http://google.com/ # load chromium after boot and open ...
31
votes
Accepted
Navigating through USB drive with "cd /myOtherFolder" causes "no such directory" error
You put a leading / to your path names! That's the root directory, meaning what you write next is an absolute path.
Your /myFolder/myOtherFolder is not on your USB if it's mounted inside /media/pi/...
23
votes
Which model Raspberry Pi I am running?
By CPU Type
You could check the RPi version with the command, uname. The different RPi versions have different CPU architectures. The RPi 2 has an arm7, whereas the 3 has an arm8.
uname -m
By ...
12
votes
Open chromium full screen on start up
on chromium you can use --start-fullscreen (like F11)
11
votes
Which model Raspberry Pi I am running?
There are many methods (of varying reliability) to determine this.
One of the most complete and reliable is gpio -v which produces the following output.
gpio version: 2.44
Copyright (c) 2012-2017 ...
10
votes
Navigating through USB drive with "cd /myOtherFolder" causes "no such directory" error
To go into a bit more detail —
Whether you come from a Windows or Mac OS X background, you will be used to external drives being independent places from your hard disk (more or less).
Part of Unix ...
8
votes
Accepted
Launch GUI to view current directory from command line?
This is not really RasPi specific and just depends on your OS / it's installed file manager.
For Raspbian, that should be pcmanfm
So pcmanfm .
8
votes
Accepted
bash: npm: command not found
Don't install Node.js directly from apt—it's hideously out of date, and most of the features you're expecting to have won't work. The version in the repositories at the minute is v0.10.29, while the ...
7
votes
Accepted
How do I make sudo!! add a space after sudo?
You need to use
sudo !!
instead of sudo!!. This is intended behaviour. The !! history expansion, as stated in the documentation:
designates the preceding command. When you type this, the ...
7
votes
Accepted
Error in apt-get update
All the repository URL's are in the apt source files.
The main source file is /etc/apt/sources.list. You can edit the file with e.g. nano to remove the offending 'etcher' line(s):
sudo nano /etc/apt/...
7
votes
Accepted
Find out whether SPI is enabled or not
You can use raspi-config non-interactively to get the SPI status:
sudo raspi-config nonint get_spi
Which returns 0 (enabled) or 1 (disabled)
Similarly, enable with:
sudo raspi-config nonint do_spi ...
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 ...
6
votes
Accepted
Accessing EXPORTED Environment Variables in Python
The problem is the use of sudo. sudo will clear environment variables by default.
You can use sudo -E (or --preserve-env) to not clear the environment. This can also be set in your sudoers file.
6
votes
Accepted
Why am I getting bash: esptool.py: command not found on new Raspbian install after installing esptool.py
On your original working install you probably installed it with sudo. If you use
sudo pip3 install esptool
esptool.py works just calling it by name, but if you don't use sudo you have to specify ...
5
votes
Get Bash instead of /bin/sh in a VNC session started by cron
It seems like the problem originates form cron using /bin/sh and not the users SHELL default. I found other people having the same problem at
Default shell for cron issue
How to change cron shell (sh ...
5
votes
Accepted
How do I make .sh run on boot to console?
Unfortunately the Q&A you are consulting is
Mostly obsolete, since the accepted answer uses SysV init style methods instead of systemd ones. These are both init systems. The former is used on v....
5
votes
Accepted
Remote full reset (re-install) of a Raspberry
Firstly: doing this by remote is inadvisable especially if, like me, you happen to be 70+ miles from your remote pi. It's a very long drive if you screw it up. When you do this fir the first time, ...
5
votes
Accepted
Hardware Level Query for Pi Version
Files inside /proc are not "installed".
/proc is a virtual filesystem. No files inside /proc exist on the SD Card.
They are created by Linux on every reboot and only exist inside RAM.
Try the ...
4
votes
bash: npm: command not found
Your install command obviously failed (surely you read the output!?). Why would you be able to run npm -v?
Run apt-get -f install npm to fix the installation issue.
Run npm -v
That should solve your ...
4
votes
Accepted
Cronjob is missing the GET parameter in Raspberry Pi
The problem is that cron doesn't wait for your network to come up before it runs @reboot. The explanation as to why cron operates this way, and alternatives to cron are verbose, but have all been ...
4
votes
Accepted
How can I reset my ~/.bash_profile?
Copy it from /etc/skel/.profile. You'll also find .bashrc in /etc/skel
4
votes
Accepted
Removing autostart program from .bashrc
You COULD fix this by modifying the SD Card on a Linux system.
You can do this on the Pi itself by rebooting to a root shell and can repair most such problems on the Pi.
1. Append `init=/bin/sh` at ...
4
votes
Accepted
What Revision(s) does cat /proc/cpuinfo return on the new Pi 4 1/2/4GB?
My 1GB PI4B returns revision a03111.
$ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 ...
4
votes
How do I SSH into my Pi at home from a remote location?
This is a combination of M. Rostami's answer and my reflections on his answer, which I found cumbersome to add as comments.
NB: Your question shows you know how to find your public IP address and the ...
4
votes
Accepted
How to UNDO unwanted changes on my raspberry pi 4. Bash_profile not found
As already mentioned by others you have to use a colon instead of a space to concatenate paths:
PATH=$PATH:/usr/local/opt/python-3.9.0/bin
or
PATH=/usr/local/opt/python-3.9.0/bin:$PATH
The problem ...
3
votes
Get Bash instead of /bin/sh in a VNC session started by cron
I was able to fix the issue by adding following line in my ~/.vnc/xstartup :
export SHELL=/bin/bash
3
votes
Accepted
Raspberry Pi not loading bashrc
Upon login, bash does not automatically execute my ~/.bashrc script. Every other Linux distro I've run does this automatically, so I'm at loss to why Raspbian doesn't.
The first line of the default ....
3
votes
Accepted
Restart Pi if not reachable (3G)
I was facing a very similar situation. I ended up not using ping but curl. because many times, ping will still work even though the mobile 3G/4G connection has run out of credits/data -- while ...
3
votes
Accepted
su -s ignoring specified shell
But it seems it is just ignoring the --shell option:
Password:
Cannot execute /usr/bin/fish: No such file or directory
This is correct behaviour, as (most likely) you have not added /usr/bin/fish to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bash × 269raspbian × 57
script × 40
python × 35
boot × 28
linux × 21
cron × 19
gpio × 12
pi-3 × 11
pi-2 × 9
raspberry-pi-os-buster × 9
networking × 8
ssh × 8
chromium × 8
terminal × 8
login × 8
pi-4 × 7
python-3 × 7
pi-3b+ × 6
php × 6
systemd × 6
permissions × 6
sudo × 6
lxterminal × 6
wifi × 5