Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

host-name (System)

date_range 07-May-24

Syntax

content_copy zoom_out_map
host-name hostname;

Hierarchy Level

content_copy zoom_out_map
[edit system]

Description

Set the hostname of the router or switch.

On Junos OS Evolved, when you specify the host-name statement, the Routing Engine name where the configuration is committed is appended to the hostname you specify. For example, on Routing Engine 0, set system host-name my-host sets the hostname to my-host-re0. You can also use the %s character to designate where to substitute the Routing Engine name. For example, on Routing Engine 1, set system host-name %s_my_host sets the hostname to re1_my-host.

Options

hostname

Name of the router or switch.

Required Privilege Level

system—To view this statement in the configuration.

system-control—To add this statement to the configuration.

Release Information

Statement introduced before Junos OS Release 7.4.

footer-navigation