105
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
47
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 ...
32
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/...
24
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 ...
13
votes
Where can I share my cool scripts?
Github.com
gitlab.org
bitbucket.org
anywhere code related really
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
Open chromium full screen on start up
on chromium you can use --start-fullscreen (like F11)
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 ...
9
votes
Accepted
Log output of background or boot script
First, if the script is run by a system daemon and that daemon is running with root privileges, you do not need to use sudo. This includes init (and systemd), which includes rc.local. If that daemon ...
9
votes
Where can I share my cool scripts?
To have a jsfiddle-like shareable link for your scripts, create a Github account, and save your scripts as GISTs: https://gist.github.com/ You will be able to update them in the future if you need.
...
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
Setting system-wide path not working in /etc/environment
Can someone enlighten me of why the /etc/environment is ignored on Raspbian?
It isn't. Add this to /etc/environment:
FOO=bar
Login, and echo $FOO. It's there.
/etc/environment isn't actually ...
7
votes
Accepted
Colored console over serial connection?
The default bash prompt is set in a system wide file; for a complete explanation of how bash sources its configuration see INVOCATION near the top of man bash. In short, that system wide file is ...
7
votes
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/...
6
votes
Accepted
How does one clear the bash history?
That is the bash history not a cache. It is stored in the .bash_history file in your home directory. By default it is limited to a set number of lines (1000) and the size of the file (2000). So even ...
6
votes
Accepted
Bash command to append to /boot/config.txt
The redirection takes place before sudo takes effect.
Try something like
sudo sh -c "echo 'dtoverlay=pi3-miniuart-bt' >> /boot/config.txt"
6
votes
Where can I share my cool scripts?
One place to go to - if you care about some explaining of those scripts too - would be our official+ blog Piversify:
Piversify is a blog dedicated to the Raspberry Pi, written by members of the ...
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 ...
6
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 ...
5
votes
Accepted
Run a script on Raspbian startup but not on terminal open
You can use a cron job.
Cron is used when you want to schedule jobs to run at specific times, e.g. every hour, every Sunday at 3 a.m. It stores the details in a table for each user called a crontab ...
5
votes
Colored console over serial connection?
I read Walter's answer here and researched more and found:
https://kb.iu.edu/d/acpy which indicated:
TERM=ansi; export TERM does the job, you can add it to your .bashrc
However, I still have grey ...
5
votes
Access shell while music playing
You can use screen
It allows you to run commands in virtual terminal and then deattach from it and use terminal normally.
To install it use these commands:
sudo apt-get update
sudo apt-get install ...
5
votes
Accepted
How to wait for networking on login after reboot?
Assuming you are using Raspbian, you can use raspi-config to delay boot until the network is up.
start raspi-config with the following:
sudo raspi-config
then select option 4 Wait for network at ...
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, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bash × 259raspbian × 57
script × 39
python × 33
boot × 28
linux × 20
cron × 17
gpio × 12
pi-3 × 11
pi-2 × 9
networking × 8
raspbian-buster × 8
chromium × 8
ssh × 7
terminal × 7
python-3 × 6
systemd × 6
permissions × 6
sudo × 6
login × 6
wifi × 5
pi-4 × 5
pi-3b+ × 5
raspbian-stretch × 5
raspbian-jessie × 5