Next Previous Contents

3. Command Line and Administration

3.1 How can I list all the files in the current directory except for . and ..?

If you are using GNU ls, then ls -A will do it. Otherwise, use the regular expression "* .[^.]* ..?*".

3.2 How do I set environment variables under sh derivatives (sh, bash, zsh, etc)?

To set environment variables in the Bourne-derived shells, use the export command, as in:

export VARIABLE=value

Place this in the proper dot-file for your shell (.profile, .bashrc, .zshrc, .zshenv, etc).

3.3 How do I set environment variables under csh derivatives (csh, tcsh)?

The C-Shell uses a different syntax than the Bourne shells, and so you will need to use setenv, as in:

setenv VARIABLE value

Again, place this in the proper dot-file for your shell (.chsrc, .login, etc)

3.4 How can I set my time from an atomic clock?

From a posting to uiuc.sw.linux by Mark Roth,

First obtain the package xntp. Then run "ntpdate ntp.uiuc.edu" once on bootup, and run xntpd to keep the clock synced. Put "server ntp.uiuc.edu" in /etc/ntp.conf so xntpd knows where to get its time information.

3.5 Why should I use ssh instead of telnet or rsh?

Traditionally, telnet and rsh do not encrypt their connections. Therefore, anybody who can access a computer between yours and the destination could easily grab your password if you use those utilities. Ssh protects against this attack, along with IP spoofing, IP source routing, DNS spoofing, and X attacks based on X authentication data. Furthermore, ssh automatically sets up X forwarding for you; there is no need to mess with xhost or xauth.

To learn more about ssh, visit the ssh FAQ.

3.6 How do I upgrade my kernel?

Please see the Kernel HOWTO at http://metalab.unc.edu/LDP/HOWTO/Kernel-HOWTO.html.


Next Previous Contents