You’ll naturally need a command line for this, so start a terminal from the Dash or perhaps search for it on the Dash. You could also hold down Ctrl, Alt and T to start one up or look for LXTerminal on the System Tools menu in LXDE. There’s no need to use sudo or have administrator access for this one. Each command may be run as a regular user, and in fact the $PATH environment variable is tied to a specific user account. What makes this process even easier is the fact that you’ll only ever need to run one single command to accomplish it.
Method 1: Using a Shell Builtin Command
At the command prompt, type echo “${PATH//:/$’\n’}” and then push enter to receive a full list of each individual directory in your path on a separate line. This uses the parameter expansion programming technique with a shell builtin, so it should work with pretty much any version of the bash shell around. It might even work in some other Unix-based operating systems besides Linux like FreeBSD, though your mileage may vary.
Since this command is somewhat awkward to write, you might want to copy it and paste it over in your shell or script. If you’re pasting it into a terminal window, then remember to either click on the Edit menu and then select Paste or hold down Shift, Ctrl and V at the same time since plain Ctrl+V won’t work in a terminal window.
Method 2: Using sed or tr with $PATH
Type sed ‘s/:/\n/g’ «< “$PATH” and then push enter to use the stream editor, which will have precisely the same result as the above command. Once again, if you’d prefer, you could copy it and then use either click the Edit menu and select Paste or hold down Shift+Ctrl+V to paste it in a terminal window. Whether to use this or the builtin command is merely a matter of preference as they achieve the same exact result.
You could also use the tr program to once more achieve the exact same result, which may be useful if you don’t have sed for some reason. Issue tr ‘:’ ‘\n’ «< “$PATH” at the prompt and push enter. You could also copy and paste it the same way. The end result is completely identical in spite of whichever way you elect to do it.
None of these methods are at all incorrect. Regardless of which method you use, keep in mind that it tends to be a matter of what you happen to issue at the time. In all of these cases you’ll only need to issue a single command to get it work and there shouldn’t be any playing around since you’ll merely need to type it and then move on. Likewise, each could be added to a script without any modification.
How To Make A Variable Power Supply?PlayStation 5 Will Get Variable Refresh Rate (VRR) Support in the Coming Months,…Windows 10 Now Has Arch Linux Along With Ubuntu, SUSE And Other Complete Linux…Linux Mint 20 “Ulyana” An All 64-Bit Linux OS Based On Ubuntu 20.04 Stable…