Operating System - Linux
1835667 Members
3191 Online
110082 Solutions
New Discussion

How to set PATH for tracert command?

 
Olugbenga Gbonjubola
Occasional Advisor

How to set PATH for tracert command?

Hello All,

Please, how do I set the PATH for the linux command tracert so that I will not need to run it with /usr/sbin/tracert but with only the command tracert? And how do I configure the $PATH to include both /usr/sbin and /sbin? I use the bash shell.

Thanks in advance.

Olugbenga.
7 REPLIES 7
Alexander Chuzhoy
Honored Contributor

Re: How to set PATH for tracert command?

do you mean traceroute?


the command to set path:


export PATH=$PATH:/usr/sbin


to add /usr/sbin to path
or
export PATH=$PATH:/sbin
to add /sbin to the PATH
Olugbenga Gbonjubola
Occasional Advisor

Re: How to set PATH for tracert command?

I mean tracert (for Linux). The traceroute is for the Solaris environment.

Thanks so much.

Olugbenga.
Olivier Drouin
Trusted Contributor

Re: How to set PATH for tracert command?

PATH=$PATH:/usr/sbin/
export PATH

in 1 of these files:

/etc/profile
~/.profile
~/.bash_rc

...assuming you use bash, which is "teh best" (c).
Kiyoshi Miyake
Frequent Advisor

Re: How to set PATH for tracert command?

Hi,

if you want set path for ONLY tracert,
you should not add path(/sbin) to $PATH.
you should use alias.

in .bashrc
alias tracert=/usr/sbin/tracrt

thanks.
Steven E. Protter
Exalted Contributor

Re: How to set PATH for tracert command?

Last I checked, the command for Linux is traceroute, not tracert

tracert is for Windows.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yong_7
Frequent Advisor

Re: How to set PATH for tracert command?

hi,

to be cautious person, what linux distro are you using ? is tracert a built-in command of that or someone renamed it to tracert to "align" with windoze command ?

hth.

YJ
dirk dierickx
Honored Contributor

Re: How to set PATH for tracert command?

Still, what braindead linux distro is going to use 'tracert' instead of 'traceroute'. I'm OK with it if it is a symbolic link or something, but if they actualy renamed the command, that would be pretty bad.