0

so I'm new to the world of Linux. Due to my new internship however, I have to work a lot with it and thus also get a hang of using the terminal appropriately.

Is there a way to set path-variables for faster navigation through directories? Similar to using '~' as an abbreviation for '/home/usr/'.

So far, I have tried to use:

    ```
    name@torch:~$ export var=/home/usr/where/i/want/to/go
    name@torch:~$ cd $var
    name@torch:~/where/i/want/to/go$ ...
    ```
    

This option works only temporarily in a single shell but is not adapted when closing down the terminal or starting another one next to it. Is there a way to define more general path-variables?

Best wishes, Hauke

Hauke
  • 1
  • 1
  • 1
    Does this answer your question? [How to permanently export a variable in Linux?](https://stackoverflow.com/questions/13046624/how-to-permanently-export-a-variable-in-linux) – Thomas Jan 26 '21 at 08:37
  • @Hauke : You have to place it into a file which is processed by your shell automatically. May I suggest that you switch from (POSIX)-shell to, say, zsh, ksh or bash? All these shells provide a place where you can type these settings. For POSIX-shell, AFIK the only guaranteed places are files in /etc, which you probably don't want to touch. – user1934428 Jan 26 '21 at 09:59

0 Answers0