Search My Techie Guy

Monday, November 24, 2014

snmpwalk -v bash: snmpwalk: command not found yet Net-Snmp is successfully installed

I already have Net-Snmp installed on my server but couldn't run any snmp commands!


# snmpwalk -v
bash: snmpwalk: command not found


The problem is that the snmp binaries are not listed in my system's environment PATH!

# find / -name snmpwalk

#echo $PATH

So i added the PATH "/usr/local/bin" to my system's environment PATH:

export PATH=$PATH:/usr/local/bin

#echo $PATH

#snmpwalk -V
NET-SNMP version: 5.4.4

To make the environment PATH persistent through system restarts, follow these steps:

  • vi /etc/profile
Add this line at the bottom, depending on your system's suitable environment PATH:
  • PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Netra-240/sbin:/opt/sun/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin:/opt/CTEact/bin:/usr/local/bin
Run this command to update the system environment PATH:
  • source /etc/profile 
  •  #echo $PATH
Post a Comment