Run shell scripts and commands on your Raspberry Pi from any folder! I show you how to add PATH to Raspberry Pi environment variables using /etc/environment file. I also cover ways to add flags to use with scripts/programming languages and a quick way to access an SMB network share (or any directory on your Raspberry Pi) using an environment variable in bash/zsh shell. Finally, I walk through a wget example where you can output the file in a custom path by default every time!
Stop hard-coding and start using the /etc/environment file on your Raspberry Pi (or linux machine)!
=== Commands/Variables Used ===
sudo nano /etc/environment (Modify the environment file using nano)
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" (PATH variable in /etc/environment)
sudo reboot (Reboot Raspberry Pi)
#raspberrypi #raspberrypi5 #raspberrypiprojects #raspberrypi4
Watch video Raspberry Pi: Share Variables Everywhere | Environment File online without registration, duration hours minute second in high quality. This video was added by user Arcade Spinner 31 July 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 34 once and liked it 3 people.