Why must I use /sbin/xxxxx when trying to run apps?

New to Debian (Or Linux in general)? Ask your questions here!

Why must I use /sbin/xxxxx when trying to run apps?

Postby road hazard » 2020-04-19 20:01

I just got done installing Debian 10.3 Cinnamon. I didn't assign a root password during setup in case that matters.

After mdadm was installed, I noticed that I couldn't run it as my own account unless I prefaced it with /sbin/:

Code: Select all
roadhazard@debian:~$ mdadm
bash: mdadm: command not found
roadhazard@debian:~$ /sbin/mdadm
Usage: mdadm --help
  for help


Just trying to understand the reasoning behind that. I only see this behaviour in Debian. In Ubuntu/Mint/Manjaro/EndeavourOS/etc.... I can run mdadm... the 'reboot' command, etc. all from a normal terminal. Why is Debian unique and requires the leading path to where the file is? I'm assuming it has something to do with a path environment variable not setup in Debian but is in every other distro I've tried?

Thinking about moving from Mint to vanilla Debian on my media server and want to have a full understanding of any 'gotchas' that might pop up. I'm wondering what else do I take for granted in Mint that will require re-learning if I switched to Debian?
road hazard
 
Posts: 25
Joined: 2017-06-21 19:36

Re: Why must I use /sbin/xxxxx when trying to run apps?

Postby sunrat » 2020-04-19 21:47

“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 3086
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Why must I use /sbin/xxxxx when trying to run apps?

Postby road hazard » 2020-04-19 23:17

sunrat wrote:http://forums.debian.net/viewtopic.php?f=16&t=142973


That would explain it, thanks!

On a similar note, I noticed that right clicking on a .deb package and opening it up with Gdebi and clicking 'install' wasn't actually installing anything. I stumbled upon this thread: viewtopic.php?f=10&t=143249&p=706161&hilit=+gdebi+click+install#p706161 and that helped me understand things but any idea why Debian is re-inventing the wheel with all these changes? What problems are they trying to solve?
road hazard
 
Posts: 25
Joined: 2017-06-21 19:36

Re: Why must I use /sbin/xxxxx when trying to run apps?

Postby Head_on_a_Stick » 2020-04-20 12:07

road hazard wrote:Just trying to understand the reasoning behind that

Why bother putting the /sbin directories in PATH if the normal user can't run them? Makes sense to me.

Note that this has nothing to do with my linked [FAQ] post, that's about the 'su' command and you're not using that here.

If you want to add the /sbin directories to your normal user's PATH then just add them via ~/.profile, like this:
Code: Select all
# include sbin in PATH
if [ -d "/sbin" ] ; then
    PATH="/sbin:$PATH"
fi

if [ -d "/usr/sbin" ] ; then
    PATH="/usr/sbin:$PATH"
fi

road hazard wrote:any idea why Debian is re-inventing the wheel with all these changes? What problems are they trying to solve?

In respect of the 'su' changes see https://bugs.debian.org/cgi-bin/bugrepo ... bug=905409 (which is linked in my [FAQ] post but I guess you're too lazy to click on that and would instead prefer to be a help vampire).
User avatar
Head_on_a_Stick
 
Posts: 12129
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Why must I use /sbin/xxxxx when trying to run apps?

Postby road hazard » 2020-04-20 13:51

Head_on_a_Stick wrote:
road hazard wrote:Just trying to understand the reasoning behind that

Why bother putting the /sbin directories in PATH if the normal user can't run them? Makes sense to me.

Note that this has nothing to do with my linked [FAQ] post, that's about the 'su' command and you're not using that here.

If you want to add the /sbin directories to your normal user's PATH then just add them via ~/.profile, like this:
Code: Select all
# include sbin in PATH
if [ -d "/sbin" ] ; then
    PATH="/sbin:$PATH"
fi

if [ -d "/usr/sbin" ] ; then
    PATH="/usr/sbin:$PATH"
fi

road hazard wrote:any idea why Debian is re-inventing the wheel with all these changes? What problems are they trying to solve?

In respect of the 'su' changes see https://bugs.debian.org/cgi-bin/bugrepo ... bug=905409 (which is linked in my [FAQ] post but I guess you're too lazy to click on that and would instead prefer to be a help vampire).


Lazy? Help vampire? Did I take a wrong turn and end up on the Arch forum asking for help with my non-pure Arch based distro?!?! The Arch forum has NOTHING on the Debian forum as far as treating newbies like complete garbage.

Since we're stooping to name calling.... first off smart ass, why are you even posting in the NEWBIE section? If you can't be bothered to help NEWBIES, STAY OUT OF HERE! Newbies like myself are going to ask newbie questions. If nobody replied to my question I wouldn't have given a sh*t and moved on with my life. Heck, lets go a step further, why even have a forum? Just post a FAQ and release notes since everything is answered in those spots, right? Until the day comes when I can punch in a logically constructed sentence and Google/whatever web forum can return the EXACT data I'm looking for, you're gonna have to suffer first world problems and hold peoples hands. I wonder if ONE of the reasons for Linux's low adoption rate is seasoned vets calling newcomers lazy help vampires? Think back to when you started using Linux.... did you ask stupid questions that were answered in obscure bug logs or were you born knowing everything about Linux?

Head_on_a_Stick wrote:Why bother putting the /sbin directories in PATH if the normal user can't run them? Makes sense to me.


I get what you're saying but it doesn't make sense because Debian is the ONLY distro I've ever played with that has that behaviour. What problem is Debian trying to address by doing things that way?

I'm with the guy towards the bottom of sunrat's link. Debian is doing something that no other distro (to my limited/newbie knowledge) is doing and it really does look like intentional sabotage. Are you guys heading off a cliff with all your SJW new hires?

Ha, I think I figured it out. I remember reading not too long ago that there were going to be some changes in Debian land and people were going to be put in charge of things based solely on the color of their hair and sexual orientation and THOSE people are making these asinine decisions. Are THOSE the folks responsible for tanking Debian?
road hazard
 
Posts: 25
Joined: 2017-06-21 19:36

Re: Why must I use /sbin/xxxxx when trying to run apps?

Postby cuckooflew » 2020-04-20 18:31

Please Read.. What we expect you have already Done.
Does any one know about this ?
Users browsing this forum: Google Knows, and
My grand father knows all about everything:
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 377
Joined: 2018-05-10 19:34
Location: Some where out west


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable