hostname
hostname is a Linux command in the System Info category, rated intermediate difficulty. Shows or sets the system hostname. The syntax is hostname [options] [name]. It returns hostname string. A practical example: hostname # Show current hostname hostname -I # Show IP addresses hostname newname # Set hostname (requires root) A close relative is uname, which displays system information (kernel name, hostname, architecture). A close relative is df, which reports disk space usage for mounted filesystems. A close relative is du, which estimates file and directory space usage. More about this category: Linux system info commands — uname, df, du, free, uptime, lscpu, and more. View system information and hardware details. Related System Info commands: uname, df, du, free, uptime, lscpu, lsusb, lspci. This page is part of the free Linux Reference documentation covering 304+ commands, each with syntax, options, practical examples, and a difficulty rating.