Skip to main content
p. 343

13.5 Default User Settings

The best way to write startup files and choose defaults for new users is to experiment with a new test user on the system. Create the test user with an empty home directory and refrain from copying your own startup files to the test user’s directory. Write the new startup files from scratch.

When you think you have a working setup, log in as the new test user in all possible ways (on the console, remotely, and so on). Make sure that you test as many things as possible, including the windowing system operation and manual pages. When you’re happy with the test user, create a second test user, copying the startup files from the first test user. If everything still works, you now have a new set of startup files that you can distribute to new users.

This section outlines reasonable defaults for new users.

13.5.1 Shell Defaults​

The default shell for any new user on a Linux system should be bash because:

  • Users interact with the same shell that they use to write shell scripts. (For many reasons, which I won’t expand upon here, csh is a notoriously bad scripting tool—don’t even think about it.)
  • bash is the default on Linux distributions. p. 344
  • bash uses the GNU readline library to accept input, and therefore its interface is identical to that of many other tools.
  • bash gives you fine, easy-to-understand control over I/O redirection and file handles.

However, many seasoned Unix wizards use a shell such as csh or tcsh simply because it’s what they’re most familiar with, and they can’t bear to switch. Of course, you can choose any shell you like, but choose bash if you don’t have any preference, and use bash as the default shell for any new user on the system. (Users can change their shell with the chsh command to suit their individual preference.)

note

There are plenty of other shells out there (rc, ksh, zsh, es, and so on). Some are not appropriate as beginner shells, but zsh and fish are sometimes popular with new users looking for an alternative shell.

13.5.2 Editor​

On traditional systems, the default editor is vi or emacs. These are the only editors virtually guaranteed to exist (or at least be available) on nearly any Unix system, which means they’ll cause the least trouble in the long run for a new user. However, Linux distributions often configure nano to be the default editor, because it’s easier for beginners to use.

As with shell startup files, avoid large default editor startup files. A little set showmatch in the .exrc startup file (to have vi show matching parentheses) never hurt anyone, but steer clear of anything that significantly changes the editor’s behavior or appearance, such as the showmode feature, auto-indentation, and wrap margins.

13.5.3 Pager​

The pager is a program, such as less, that shows text one page at a time. It’s perfectly reasonable to set the default PAGER environment variable to less.