I am working on a SUSE linux box 3.0.101-0.35-default. I want to know if this is possible to move all the commands in the /bin to the /sbin folder, will all the commands will work normally under root user after this
Abhinav
I am working on a SUSE linux box 3.0.101-0.35-default. I want to know if this is possible to move all the commands in the /bin to the /sbin folder, will all the commands will work normally under root user after this
Abhinav
is it possible to move all the commands in the /bin to the /sbin folder,
Yes, nothing stops you from moving the command. Or copying them and then deleting them afterwards.
That is not to say that you will end up with a working system after you have done this. If some scripts use hardcoded paths to /bin/ then those scripts will fail.
will all the commands will work normally under root user after this
Just moving them to another path which is in the search PATH for root will not result in any problems. It also has no advantages and it probably means that the commands are not in the default search path for normal users. (Which they can solve by editing their path variable or by explicitly using the new location).
But for the uid 0 (root, toor, admin, ...) account nothing should actually change.
Update. I just installed OpenSuse and actually tested it with the example command you gave in the comments. (uname).
As you can see uname is not installed in /bin by default. Instead it was found in /usr/bin/. Other than that copying it to /sbin/ succeeds and the command works just fine when I start it from the new location.
I also tested it with a command from /bin/ (as per title), and that also works as expected.
rehashorharsh -rcommand. (Also see http://superuser.com/questions/490983/how-to-rehash-executables-in-path-with-bash). – Hennes Oct 09 '15 at 13:28