Changing the Ubuntu Path to Run Programs Without Their Full Path

Add a directory to the Ubuntu path permanently so it remains after a reboot

Teri Radichel
Cloud Security
Published in
7 min readJun 4, 2023

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ Check out my series on Automating Cybersecurity Metrics | Code.

🔒 Related Stories: Application Security | Secure Code | AWS Security | EC2

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In my last post I installed git from the source code in a git source code on GitHub.

I got it working but in the end I had to specify the path to run the git application. I could either specify the full path to git from some other directory, or I can navigate to the directory where git exists and execute a command like this:

./git --version

Changing the Ubuntu Path

One way to solve our problem might be to update the path on Ubuntu. Let’s say we want to be able to run any executable in a given directory. We could add the directory to the path and then we…

--

--

Teri Radichel
Cloud Security

CEO 2nd Sight Lab | Penetration Testing & Assessments | AWS Hero | Masters of Infosec & Software Engineering | GSE 240 etc | IANS | SANS Difference Makers Award