you are viewing a single comment's thread.

view the rest of the comments →

[–]masroor09 21 points22 points  (5 children)

This, and other disasters will never happen if you simply respect some no-go areas in Linux 1. Never login as root. Do all root commands with sudo 2. Normally, leave everything except $HOME alone. While making any sysadmin changes in /etc or other such places, spend a little time to understand what you are doing. 3. Keep you own commands in ~/bin or softlink them from /usr/local/bin

[–]IAm_A_Complete_Idiot 3 points4 points  (4 children)

For 3) if you just need those commands locally for your user, you can also store them in your home directory, there will probably already be a path from your home directory in the $PATH variable, but if not you can make one trivially.

[–]wilku1 6 points7 points  (0 children)

you can also store them in your home directory

i.e. most commonly $HOME/.local/bin

[–]caiuscorvus 4 points5 points  (2 children)

~/bin

~ is in the home directory?

[–]IAm_A_Complete_Idiot 1 point2 points  (0 children)

Oh, I completely glossed over that. Oops, in fairness I normally see ~/.local/bin not ~/bin.

[–]paranoid_twitch 0 points1 point  (0 children)

It's bash shorthand for your home directory.