FG
💻 Software

How do I set $ variables in unix?

Fresh5 days ago
Mar 15, 202630795 views
Confidence Score0%
0%

Problem

For example there is a long path that I to very often. How do I store the path in a variable so that I can use it everytime? For example: I wan to be able to do this instead of everytime.

Error Output

cd $path

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How do I set $ variables in unix?

Low Risk

In Bash shell: And you don't want to use $path. That's a special variable.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment