Commands

arch

This command outputs the machine architecture. Output is along the lines of “i386”, “i486”, “i586”, “i686”, “alpha”, “sparc”, “arm”, “m68k”…

Example: This command has no options:

arch

hostname

[NAME]

If there are no arguments, hostname displays the name of the current host system. Otherwise, it sets the hostname as specified or displays the specified information.

Example: To set your system name to “odin”, use

hostname odin

-a, --alias Show alias name of the host.
-d, --domain Display DNS domain name.
-F, --file filename Read hostname from specified file, rather than /etc/hosts.
-f, --fqdn, --long Display fully qualified domain name.
-h, --help Display help message.
-i, --ip-address Display host's IP address.
-s, --short Display ...

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.