This section describes commands that enable you to change general system information.
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] |
Month, using two digits.
Day of the month, using two digits.
Hour, using two digits and a 24-hour clock.
Minutes, using two digits.
Century, using two digits.
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.
The following example shows how to use the date command to manually set a system's date and time.
# date Wed Mar 3 14:04:19 MST 2004 # date 0121173404 Thu Jan 21 17:34:34 MST 2004 |
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. |
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. |
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 – Applies only to some release Solaris releases.
Starting with the Solaris 10 8/07 release, there is no longer two separate hosts files. The /etc/inet/hosts file is the single hosts file that contains both IPv4 and IPv6 entries. You do not need to maintain IPv4 entries in two hosts files that always require synchronization. For backward compatibility, the /etc/inet/ipnodes file is replaced with a symbolic link of the same name to the /etc/inet/hosts file. For more information, see the hosts(4) man page.
(Optional) 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 |
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 . . . |
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, . . . |