Never type the full path to your config files again

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

Never type the full path to your config files again

🧩 The Challenge

Trying to hunt down a specific config file in /etc/nginx/sites-available or /etc/php/8.2/fpm/pool.d while dealing with a midnight outage is a special kind of hell. You end up tab-completing your way into a typo and wasting precious minutes.

💡 The Fix

Create an environment variable that points to your most-accessed directory and alias a quick jump command. It turns those twenty-character paths into a single word.

export CONFIG_PATH=/etc/nginx/sites-available
alias cdn='cd $CONFIG_PATH'

⚙️ Why It Works

Setting this as an environment variable means you can reference it in scripts, aliases, or even subshells without retyping the path. It keeps your terminal clean and saves your muscle memory from unnecessary strain.

🚀 Pro-Tip: Add this to your .bashrc and export a few more for your log directories while you are in there.

Linux Tips & Tricks | © ngelinux.com | 11/2/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted