LINUX: How do I enable SNMP on Ubuntu

As always, I seem to forget things, among theese is the SNMP setup for Ubuntu, so now, for myself to remember, I created this little guide 🙂

This is btw. run on a Ubuntu Server 20.04 LTS

Run the following commands on the terminal:

  1. Update all packages: sudo apt-get update
  2. Install SNMP: sudo apt-get install snmpd
  3. Edit snmpd.conf with text editor of your choice, I will be using nano, as this is an easy editor, so type: sudo nano /etc/snmp/snmpd.conf
  4. Configure agentAddress: agentAddress 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.): agentAddress udp:
  5. Configure rocommunity: rocommunity public
    -Change “public” to your community name
  6. Restart the SNMPD service: sudo service snmpd restart
  7. Check that SNMPD is started OK with this: sudo service snmpd status

All good! – Now go setup your favorite monitoring tool for SNMP access 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.