Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25th January 2006, 10:59 PM
evolotion Offline
Registered User
 
Join Date: Jan 2005
Posts: 17
BASH: Command not found

Having soem bother with my linux box (fc3) after a few uptates, alot of commands are not working, for example to run ifconfig i need to type in /sbin/ifconfig as just typing ifconfig yeilds a command not found error.

where is the config file that defines the paths? what is it called? as i assume its been deleted/changed/whatever.
Reply With Quote
  #2  
Old 25th January 2006, 11:17 PM
landoncz's Avatar
landoncz Offline
Registered User
 
Join Date: Dec 2005
Location: Florida, USA
Age: 34
Posts: 338
Just add the path "/sbin" to your path variable in your .bashrc file in your home directory (assuming you are using bash shell). C-shell is .cshrc...
__________________
Fedora Core 6 on Asus Z63A 14" Laptop
2.0 Ghz Pentium M
1 Gig RAM
100 Gig 7200 RPM

Code:
# rm -rf /dev/brain
Reply With Quote
  #3  
Old 25th January 2006, 11:33 PM
evolotion Offline
Registered User
 
Join Date: Jan 2005
Posts: 17
hmmm.. cheers, but my .bashrc looks like this : =
Cant see any path variable :S
Code:
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
Reply With Quote
  #4  
Old 26th January 2006, 12:23 AM
landoncz's Avatar
landoncz Offline
Registered User
 
Join Date: Dec 2005
Location: Florida, USA
Age: 34
Posts: 338
Try adding this to your bashrc file:

Code:
PATH=$PATH:/sbin
export PATH
This appends the path /sbin to your current path variable... should work...
__________________
Fedora Core 6 on Asus Z63A 14" Laptop
2.0 Ghz Pentium M
1 Gig RAM
100 Gig 7200 RPM

Code:
# rm -rf /dev/brain
Reply With Quote
  #5  
Old 26th January 2006, 12:30 AM
Mat's Avatar
Mat Offline
Retired Community Manager
 
Join Date: Jun 2004
Location: lair of a unix daemon
Posts: 1,155
add
Code:
PATH=$PATH:/sbin
to ~/.bash_profile


Mat
__________________
Man will always find a difficult means to perform a simple task
(Rube Goldberg)

Having fun with Tcl at
Mat's Playground
Reply With Quote
  #6  
Old 26th January 2006, 05:49 AM
gavinw6662 Offline
Registered User
 
Join Date: Feb 2005
Age: 34
Posts: 1,281
Quote:
Originally Posted by evolotion
Having soem bother with my linux box (fc3) after a few uptates, alot of commands are not working, for example to run ifconfig i need to type in /sbin/ifconfig as just typing ifconfig yeilds a command not found error.

where is the config file that defines the paths? what is it called? as i assume its been deleted/changed/whatever.

ifconfig is in /sbin which typically root has access too. Where you using root before, and not now?? Or where you sudo'd to root and never backed out??
__________________
I read your e-mail
Reply With Quote
  #7  
Old 26th January 2006, 01:53 PM
evolotion Offline
Registered User
 
Join Date: Jan 2005
Posts: 17
haveing this trouble with commands whether im SU'd into root or as a regular user. the ifconfig was an example, it happens with other commands aswell.
Reply With Quote
  #8  
Old 26th January 2006, 03:00 PM
Mat's Avatar
Mat Offline
Retired Community Manager
 
Join Date: Jun 2004
Location: lair of a unix daemon
Posts: 1,155
evolotion, changing to root with
$ su
is different than changing via
$ su -
!!

with the latter, you have root's path (including /sbin) and with the former, you are only left with the user's path that issued the "su" command (which does not include /sbin)..

have a look at
$ man su
for details





Mat
__________________
Man will always find a difficult means to perform a simple task
(Rube Goldberg)

Having fun with Tcl at
Mat's Playground
Reply With Quote
  #9  
Old 26th January 2006, 03:07 PM
ibbo's Avatar
ibbo Offline
Registered User
 
Join Date: Jun 2005
Location: Leeds
Posts: 1,264
Your best leaving it as is.

The advantages of this are if ever a program of yours is tampered with or another copy of a malicious version is installed then when you type ifconfig it will run the ifconfig from the first dir it finds in the search path. Which means if you have an ifconfig in your own bin dir then that will be run instead of /sbin/ifconfig. This was introcuced to linux years abck as an extra security measure. Looks like its going round full circle.

Dont sound like a big deal but it is when things go belly up. Besides after a while you start to know exactly where stuff is and adding and extra /sb -> TAB is not much typing thus not much bother.

Ibbo
__________________
A Hangover Lasts A Day, But Our Drunken Memories Last A Lifetime
--
Linux user #349545
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCfdjyzXscddzQvlhBedAcD7qfKmHo==zx0H
Reply With Quote
Reply

Tags
bash, command

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: make: command not found gregma Installation and Live Media 7 9th January 2008 11:08 AM
bash: command not found manin Using Fedora 2 30th October 2007 12:58 PM
bash: rmmod: command not found Stlgera Using Fedora 3 10th December 2006 08:34 PM
bash:cc:command not found snowbird91 Using Fedora 3 4th January 2006 06:53 PM
bash: ifconfig: command not found lukehounsome Servers & Networking 7 30th January 2005 12:23 PM


Current GMT-time: 10:55 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat