PDA

View Full Version : Unable to traceroute


traced
2003-09-22, 15:39 PM
Hi,

I tried to make a traceroute on one of my website from a bash command through SSH. but I get the following error message:

-bash: traceroute: command not found

I also have that problem with the following commands:

hdparm, route, ifconfig, fuser, fdisk, useradd

Does any limitation on serverbeach config exists?

Thanks for your answer,

Best regards

Olivier

QT
2003-09-22, 15:52 PM
Did you make sure that /usr/sbin and /sbin are in your $PATH?

traced
2003-09-22, 16:28 PM
Where can I check it?

Tino Didriksen
2003-09-22, 16:47 PM
echo $PATH

Or you can do locate bin/traceroute to get the full path, which is /usr/sbin/traceroute.

traced
2003-09-22, 16:57 PM
You're right!

/usr/sbin and /sbin are not declared in the $PATH variable.

How can I edit the $PATH to insert both?

QT
2003-09-22, 17:55 PM
Originally posted by traced
You're right!

/usr/sbin and /sbin are not declared in the $PATH variable.

How can I edit the $PATH to insert both?

If you want to change it for the entire system, (ie: all users) edit /etc/profile and add those directories to the end of the PATH statement.

If you just want to do this for your user, edit the .bash_profile in your home directory and do the same thing. :)

traced
2003-09-22, 18:12 PM
Sorry to bother you with my stupid question, but I'm in a stage of learning Linux and bash shell which I begin to notice is not to far from PHP.

That's what I learn right now:

$PATH is an environnement variable which can be changed like any other variable:

PATH="/your:/path string:/here"

Many thanks to both of you for your help resolving my problem.

Best regards,

Olivier

traced
2003-09-22, 18:24 PM
THX QT_

The way you explain is more clean than what I did ...

I just changed the entry in the .bash_profile and it works fine.


By the way, where is the $PATH variable declared (not in /etc/profile/)?


Best regards and have a good day (evening, night? ;-) )

Olivier