Saturday 26, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Sunday, 16 July 2017

Set or display host name - hostname Linux Command

hostname

hostname [option] [nameofhost]

Description

Set or display name of current host system. A privileged user can set the hostname with the nameofhost argument.


Options

-a, --alias
Display the alias name of the host (if used).

-d, --domain
Display DNS domain name.

-f, --fqdn, --long
Display fully qualified domain name.

-F file, --file file
Consult file for hostname.

-h, --help
Display a help message and then exit.

-i, --ip-address
Display the IP address(es) of the host.

-n, --node
Display or set the DECnet node name.

-s, --short
Trim domain information from the display output.

-v, --verbose
Verbose mode.

-V, --version
Display version information and then exit.

-y, --yp, --nis
Display the NIS domain name. A privileged user can set a new NIS domain name with nameofhost.

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • Create or change a password using passwd Linux Command passwd passwd [options] [user] Create or change a password associated with a user name. Only the owner or a privileged user may change a password. Owners need not specify their user name. Users can change their own passwo… Read More
  • grep Linux Command grep grep [options] pattern [files] Search one or more files for lines that match a regular expression pattern. Regular expressions are described in Chapter 7. Exit status is 0 if any lines match, 1 if none match, and 2 fo… Read More
  • fuser Linux Command fuser fuser [options] [files | filesystems] Identifies and outputs the process IDs of processes that are using the files or local filesystems. Each process ID is followed by a letter code: c if process is using file as the… Read More
  • echo - Linux Command echo echo [options] [string] Send (echo) the input string to standard output. This is the /bin/echo command. echo also exists as a command built into bash. The following character sequences have special meanings: \a Aler… Read More
  • Patch Linux Command patch patch [options] [original [patchfile] ] Apply the patches specified in patchfile to original. Replace the original with the new, patched version; move the original to original.orig or original~. The patch file is a d… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Set or display host name - hostname Linux Command Rating: 5 Reviewed By: eHowToNow