Which of the following commands adds the directory /new/dir/ to the PATH environment variable?
Which of the following commands adds the directory /new/dir/ to the PATH environment variable?
To add the directory /new/dir/ to the PATH environment variable, the correct command is 'export PATH=/new/dir:$PATH'. This command exports the PATH variable with /new/dir prepended to the current PATH, ensuring that the directory is included in the environment variable.
None of these are right. It should be like this. You want to set the PATH variable to the current path value, then append the : delimiter, followed by the new directory you're appending. export PATH=$PATH:/new/dir
E is also correct, the only difference is that new/dir will be at the begining of the PATH variable
Yeah, E is correct as well as WeinerFarts68.
WeinerFarts68 is correct.
Interesting