Everything You Need to Know About $PATH in Bash



Everything You Need to Know About $PATH in Bash

Everything You Need to Know About $PATH in Bash

How does PATH work in Linux? How does Linux know where to look for the commands that you type at the command-line? In this video you’ll learn how the $PATH variable works in Linux. Specifically, we’ll look at how this value is looked up in bash, and how you can modify it.

I’ll also introduce you to the `which` command, which you can use to check which filepath bash is using for a given name (executable).

To modify PATH for
-a single user (normal or root): /home/username/.bash_profile
-all users except root: /etc/profile

My step-by-step project-based Linux course for beginners: https://www.udemy.com/course/hands-on-linux-self-hosted-wordpress-for-linux-beginners/?referralCode=19C0A7DEE2FD53C9C09D

Free Linux Sysadmin Course Playlist: https://www.youtube.com/playlist?list=PLtK75qxsQaMLZSo7KL-PmiRarU7hrpnwK

DigitalOcean referral link: https://m.do.co/c/0380a1db56a6

Patreon: https://www.patreon.com/tutorialinux
Official Site & e-mail list: https://tutorialinux.com/
Twitter: https://twitter.com/tutorialinux
Facebook: https://www.facebook.com/tutorialinux
Podcast: http://kernelpanicpodcast.com

Comments are closed.