LINUX - How do I enable SNMP on Ubuntu

Run the following commands on the terminal:


This guide is for written for Ubuntu Server 20.04 LTS

Run the following commands on the terminal:

Update all packages and Install SNMP:

1sudo apt-get update
2sudo apt-get install snmpd

Edit snmpd.conf with text editor of your choice, I will be using nano, as this is an easy editor

1sudo nano /etc/snmp/snmpd.conf
Configure agentAddress:
1agentAddress udp:161,udp6:[::1]:161
This will set the server to listen on all IPv4 and IPv6 addresses (remove the ‘#’ in front of the agentAddress, to enable it!) To bind it to a specific IP address use (ex.):
1agentAddress udp:
Configure rocommunity:
1rocommunity public
Change “public” to your community name Restart the SNMPD service:
1sudo service snmpd restart
Check that SNMPD is started OK with this:
1sudo service snmpd status