Changing the System Configuration

Most (nearly all) of the system configuration files for Unix systems are contained in the /etc directory. If it's a configuration setting that's specific to a user, the setting will be located in the user's home directory; otherwise, configuration settings for the whole system are located in the /etc directory.

We're not going to get into changing much hereyou really should know what you're doing before you start futzing with the system configuration. However, if you're root, you should have some fun with it, so here's something fun to play with. In the following example, you'll see how to change the Message of the Day (aka, the motd), which users are greeted with when they log into the system (Figures 16.1 and 16.2).

Figure 16.1. Any user will see the motd when logging in.

Figure 16.2. After a user with root privilege edits it, it'

To Change the motd:


sudo vi /etc/motd

Use sudo to gain root access and edit the /etc/motd file.


Hey, you have wrinkles in your stockings! Oh...sorry, you're not wearing stockings!

Uhhh, yikes! Add your favorite slogan, saying, or comment to the file. Keep in mind that everyone who logs into the system will see this message, so keep it clean...and be nice! (Figure 16.2)



Log out, so you can log back in and see your handiwork.



Log back in to see the new message.


  • The /etc/motd file is really handy for providing warnings, notes, and comments to system users. Particularly if you're planning on having system downtime or maintenance, it's nice to warn users with a message in /etc/motd.

  • Virtually every other change you might make in /etc will also affect everyone on the system. Be careful.

  • Depending on what you choose to change or edit in /etc, you might need to restart the appropriate daemon (as described in the previous section) for your changes to take effect. If it looks like your change didn't work, restart the daemon.

  • Unix man pages also usually describe the configuration files found in /etc. Use man filename (as in, man exports) to find out what the configuration does.

Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: