How to Display General System Information

How to Display General System Information

To display general system information, use the showrev

Examples–Displaying General System Information

The following example shows the showrev command output.
The -a option displays all available system information.

$ showrev -a
Hostname: starbug
Hostid: nnnnnnnn
Release: 5.9
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems
Kernel version: SunOS 5.9 May 2002

OpenWindows version:
X11 Version 6.6.1 5 April 2002

No patches are installed

You can also use the uname command to display system
information. The following example shows the uname command
output. The -a option displays the operating system name as
well as the system node name, operating system release, operating system version,
hardware name, and processor type.

$ uname
$ uname -a
SunOS starbug 5.9 Generic sun4u sparc SUNW,Ultra-5_10

How to Display a System’s Host ID Number

To display the host ID number in hexadecimal format, use the hostid command.

Example–Displaying a System’s Host ID Number

The following example shows sample output from the hostid

$ hostid

How to Display a System’s Installed Memory

To display the amount of memory installed on your system, use the prtconf command.

Example–Displaying a System’s Installed Memory

The following example shows sample output from the prtconf command. The grep Memory command selects output from the prtconf
command to display memory information only.

# prtconf | grep Memory
Memory size: 128 Megabytes

How to Display the Date and Time

To display the current date and time according to your system clock,
use the date command.

Example–Displaying the Date and Time

The following example shows sample output from the date

$ date
Thu May 31 17:44:58 MDT 2003

Changing System Information

This section describes commands that enable you to change general system

ProcedureHow to Set a System’s Date and Time Manually

  1. Become superuser.

  2. Enter the new date and time.

    # date mmddHHMM[[cc]yy]


    Month, using two digits.


    Day of the month, using two digits.


    Hour, using two digits and a 24-hour


    Minutes, using two digits.


    Century, using two digits.


    Year, using two digits.

    See date(1)
    for more information.

  3. Verify that you have reset your system’s date correctly by using the date command with no options.

Example–Setting a System’s Date and Time Manually

The following example shows how to use the date command
to manually set a system’s date and time.

# date
Thu Jun 21 13:59:15 MDT 2003
# date 0621141003
Thu Jun 21 14:10:00 MDT 2003

ProcedureHow to Set Up a Message-of-the-Day

Edit the message-of-the-day file, /etc/motd, to
include announcements or inquiries to all users of a system when they log
in. Use this feature sparingly, and edit this file regularly to remove obsolete

  1. Become superuser.

  2. Edit the /etc/motd file and add a message of your

    Edit the text to include the message that will be displayed during user
    login. Include spaces, Tabs, and Returns.

  3. Verify the changes by displaying the contents of the /etc/motd file.

    $ cat /etc/motd
    Welcome to the UNIX Universe. Have a nice day.

Example–Setting Up a Message-of-the-Day

The default message-of-the-day, provided when you install Solaris software,
contains SunOS version information.

$ cat /etc/motd
Sun Microsystems Inc. SunOS 5.9 Generic May 2002

The following example shows an edited /etc/motd
file that provides information about system availability to each user who
logs in.

$ cat /etc/motd
The system will be down from 7:00 a.m to 2:00 p.m. on
Saturday, July 7, for upgrades and maintenance.
Do not try to access the system during those hours.
Thank you.

ProcedureHow to Change a System’s Host Name

A system’s host name is specified in several different locations.

Remember to update your name service database to reflect the new host

Use the following procedure to change or rename a system’s name.

  1. Become superuser.

  2. Change the system’s host name in the following files:

    • /etc/nodename

    • /etc/hostname.xxy

    • /etc/inet/hosts

    • /etc/net/ticlts/hosts

    • /etc/net/ticots/hosts

    • /etc/net/ticotsord/hosts

  3. (Optional) If using a name service, change the system’s host name in the hostfile.

  4. Reboot the system to activate the new host name.

    # init 6


One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s