{"id":3511,"date":"2020-08-13T17:01:40","date_gmt":"2020-08-13T22:01:40","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3511"},"modified":"2021-11-11T18:59:23","modified_gmt":"2021-11-12T00:59:23","slug":"librenms-rename-host-from-command-line","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/librenms-rename-host-from-command-line\/","title":{"rendered":"LibreNMS &#8211; Rename Host From Command Line"},"content":{"rendered":"\n<p>SSH into LibreNMS server<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh user@librenms-server<\/pre>\n\n\n\n<p>cd into the LibreNMS directory<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/opt\/librenms<\/pre>\n\n\n\n<p>Rename host<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo .\/renamehost.php old-hostname new-hostname<\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<p><em>Note you can use IP addresses if the device is using that as the host name<\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo .\/renamehost.php 192.168.1.209 192.168.2<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>You may want to check out these posts<br><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-incredigeek wp-block-embed-incredigeek\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"u0wKy0tzxC\"><a href=\"https:\/\/www.incredigeek.com\/home\/show-down-devices-from-ssh-librenms\/\">Show Down Devices From SSH &#8211; LibreNMS<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Show Down Devices From SSH &#8211; LibreNMS&#8221; &#8212; Incredigeek\" src=\"https:\/\/www.incredigeek.com\/home\/show-down-devices-from-ssh-librenms\/embed\/#?secret=loRLbEsxEj#?secret=u0wKy0tzxC\" data-secret=\"u0wKy0tzxC\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-incredigeek wp-block-embed-incredigeek\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"qPGzK3ODMD\"><a href=\"https:\/\/www.incredigeek.com\/home\/get-list-of-ip-dhcp-leases-from-mikrotik-routeros-command-line\/\">Get list of IP DHCP Leases from Mikrotik RouterOS Command Line<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Get list of IP DHCP Leases from Mikrotik RouterOS Command Line&#8221; &#8212; Incredigeek\" src=\"https:\/\/www.incredigeek.com\/home\/get-list-of-ip-dhcp-leases-from-mikrotik-routeros-command-line\/embed\/#?secret=2l91XbiW3Y#?secret=qPGzK3ODMD\" data-secret=\"qPGzK3ODMD\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>SSH into LibreNMS server ssh user@librenms-server cd into the LibreNMS directory cd \/opt\/librenms Rename host sudo .\/renamehost.php old-hostname new-hostname Example: Note you can use IP addresses if the device is using that as the host name sudo .\/renamehost.php 192.168.1.209 192.168.2 &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/librenms-rename-host-from-command-line\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[352],"tags":[8,353,134,389],"class_list":["post-3511","post","type-post","status-publish","format-standard","hentry","category-librenms","tag-command-line-2","tag-librenms","tag-monitoring","tag-nms"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3511"}],"version-history":[{"count":5,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3511\/revisions"}],"predecessor-version":[{"id":4233,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3511\/revisions\/4233"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}