You are not logged in.

#1 2008-12-15 00:51:38

SkyValley
Member
Registered: 2008-04-09
Posts: 20

"command not found" when using bash as root [SOLVED]

Some examples:

bash: gparted: command not found
bash: cryptsetup: command not found
bash: lsusb: command not found

All of these are defintely installed, and work without any problems if I type in their full path. Any idea why this is happening?

Last edited by SkyValley (2008-12-15 02:57:30)

Offline

#2 2008-12-15 00:59:52

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: "command not found" when using bash as root [SOLVED]

Improper $PATH. Anything in /root/.bashrc?

Offline

#3 2008-12-15 01:34:18

SkyValley
Member
Registered: 2008-04-09
Posts: 20

Re: "command not found" when using bash as root [SOLVED]

Not even a .bashrc in /root . I'm guessing I should create it? What do I put in there?

Offline

#4 2008-12-15 02:07:33

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: "command not found" when using bash as root [SOLVED]

That means you're not starting it as a login shell, so you may want to look in to that.

/etc/profile is what you need,
echo "source /etc/profile" > /root/.bashrc

That's safe to do regardless and you can look in to the login shell problem later.

Offline

#5 2008-12-15 02:58:01

SkyValley
Member
Registered: 2008-04-09
Posts: 20

Re: "command not found" when using bash as root [SOLVED]

That works, I'll look into the login shell stuff too. Thanks, people.

Offline

Board footer

Powered by FluxBB