This section describes commands that enable you to change general system information.
How to Set a System's Date and Time Manually
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .
Enter the new date and time.
#date
mmddHHMM[[cc]yy]
mm
Month, using two digits.
dd
Day of the month, using two digits.
HH
Hour, using two digits and a 24-hour clock.
MM
Minutes, using two digits.
cc
Century, using two digits.
yy
Year, using two digits.
See the date ( 1 ) man page for more information.
Verify that you have reset your system's date correctly by using the date command with no options.
How 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
messages.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .
Edit the /etc/motd
file
and add a message of your choice.
Edit the text to include the message that will be displayed during user login. Include spaces, tabs, and carriage returns.
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 12.11. Setting Up a Message-Of-The-Day
The default message-of-the-day, which is provided when you install Solaris software, contains SunOS version information.
$ cat /etc/motd
Sun Microsystems Inc. SunOS 5.10 Generic May 2004
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.
How 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 name.
Use the following procedure to change or rename a system's host name.
You can also use the sys-unconfig command to reconfigure a system, including the host name. For more information, see the sys-unconfig ( 1M ) man page.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .
Change the system's host name in the following files:
/etc/nodename
/etc/hostname.*
interface
/etc/inet/hosts
/etc/inet/ipnodes
– Starting with
the Solaris 10 OS
Because the /etc/inet/ipnodes
file is consulted
before the /etc/inet/hosts
file when a system's host
name is resolved, you should also modify this file if you change the system's loghost
entry or its IP address.
If you are using
a name service, change the system's host name in the hosts
file.
Rename the host name directory within the /var/crash
directory.
#cd /var/crash
#mv
old-host-name
new-host-name
Reboot the system to activate the new host name.
# init 6
How to Add a Locale to a System
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .
Add the packages for the locale you want to install on your system
using the localeadm command. The
a
option
and a locale identifies the locale that you want to add. The
d
option
and a device identifies the device containing the locale packages you want
to add. To add the Central European region (ceu) to your system, for example:
# localeadm -a ceu -d /net/install/latest/Solaris/Product
locale/region name is ceu
Devices are /net/install/latest/Solaris/Product
.
.
.
One or more locales have been added.
To update the list of locales available at
.
.
.
How to Remove a Locale From a System
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services .
Remove the packages for the locale installed on your system using
the localeadm command. The
r
option and
a locale identifies the locale that you want to remove from the system. To
remove the Central European region (ceu) from your system, for example:
# localeadm -r ceu
locale/region name is ceu
Removing packages for Central Europe (ceu)
.
.
.
One or more locales have been removed.
To update the list of locales available
at the login screen's "Options->Language" menu,
.
.
.