2

Debian has recently merged /bin and /usr/bin, that is, /bin is now a symlink to /usr/bin. However, the default PATH defined in /etc/login.defs still contains both directories:

ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games 

This leads to duplicates when all directories in PATH are searched. For example:

$ type -a ls ls is /usr/bin/ls ls is /bin/ls $ ( IFS=:; grep -rlI '^#! */bin/sh' $PATH ) | grep apt- /usr/bin/apt-key /bin/apt-key 

Thus it would be nice to remove /bin and /sbin from PATH, but since this hasn't been done I assume there's some, perhaps subtle, reasons why. So, what would be the consequences of removing these directories from PATH?

1 Answer 1

1

I’m not aware of any reason not to remove the paths, I think it’s just a case of the maintainers not getting round to it. There’s a pending patch to remove /bin and /sbin from the default paths in login.defs.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.