How to install snmp on #50-Ubuntu 64 GNU/Linux?

Hi all,
I am trying to install snmp on a Linux VM so I can use snmpwalk, snmpget etc.
On searching the forum I found two old posts from 2010/11. So I wanted to ask again if there are any updated instructions on how to install snmp.

On web I found a few instructions but they suggested using yum and I am getting following error when I tried it:

root@hostname:/usr/bin# yum install net-snmp net-snmp-utils
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 You can enable repos with yum-config-manager --enable <repo>
root@hostname:/usr/bin# yum repolist all
repolist: 0

And when I searched for this error some posts suggest one should use

sudo apt-get install

and not try

yum

.
I got more confused with this and looking for some direction here.

Ubuntu comes with apt ( apt-get ) as the default package handler, although you seem to have a very basic yum installation on your VM as well.
Try

sudo apt install snmp
1 Like

Thank you RudiC. It worked fine.
Can you also point me to some reliable instructions to configure snmp please?

I see "/etc/snmp/snmp.conf" but there is no "/etc/snmp/snmpd.conf". I am not sure if that's how it is supposed to be.

Sorry, no clue. I usually try man (and the references therein) and apropos first.

Thank you for your help RudiC. Just for use of anyone who might come to this post in future, I followed instructions from this site and it worked for me (both installation and configuration).

Beginners Guide to Installing, Using, and Configuring Net-SNMP - Part 1 - Make Tech Easier