-
You can modify path display with any one of the following commands, which substitutes all occurrences of
:
with new lines\n
. -
sed
:
$ sed 's/:/\n/g' <<< "$PATH"
tr
:
$ tr ':' '\n' <<< "$PATH"
python
:
$ python -c 'import sys;print(sys.argv[1].replace(":","\n"))' "$PATH"
- Copy the contents of the
$PATH
- Delete tha
$PATH
variable:
export PATH=""
- Set the new
$PATH
export PATH="/path/you/want/to/keep"