Stop typing long paths for your deepest config directories

Environment & Shell Customization (Aliases/Functions/.Bashrc)

Stop typing long paths for your deepest config directories

🧩 The Challenge

Dealing with a deep directory structure like /etc/nginx/sites-available or /var/log/myapp/internal/subfolder makes me want to scream when I have to jump back and forth ten times a day. You always end up making a typo, backspacing, and realizing you’ve wasted thirty seconds you’ll never get back.

💡 The Fix

Just define a few short variables in your bashrc that act like bookmark shortcuts for the directories you actually care about. It’s way faster than hitting tab a dozen times.

echo 'export NGINX_SITES=/etc/nginx/sites-available' >> ~/.bashrc
echo 'export APP_LOGS=/var/log/myapp/internal/subfolder' >> ~/.bashrc
source ~/.bashrc
cd $NGINX_SITES

⚙️ Why It Works

Setting these environment variables allows the shell to expand your short nickname into the full absolute path instantly. Once you export them, they live in your session memory so you can cd into them from anywhere without hunting for the path.

🚀 Pro-Tip: Use all caps for the variable names so you don’t confuse them with your actual command aliases.

Linux Tips & Tricks | © ngelinux.com | 7/13/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted