Here are some brief tips not worth dedicating chapters to:
*) To start an app from a terminal window in X-WINDOWS and being able to continue to type in the term window, type "<app-name> &", such as
netscape &
- Note that the launched app will terminate if you close the terminal window. If you want the application to stay active no matter what, you would have to type:
nohup netscape &
which detaches the application from the console.
*) To CD to your home directory, just type
cd ~
*) To change a keyboard language in X-Windows you can type "setxkbmap us" for an example. Other information can be found in
/usr/sbin/kbdconfig
*) To put a job into foreground or background type
fg job# for foreground
bg job# for background
*) You can run multiple commands in the command line by separating them with a semi-colon, such as
ls -la; more /etc/password
*) More ls switches you might like:
-a show all files (including hidden files)
-l long format
-h file size in kb
-R include subdirectories
-t sort by time
*) DNS. If you want to query all entries for a given domain you can enter
host -l domainname
*) If you want to display only certain columns of an output, let's say only the usernames of the /etc/passwd file, you simply execute cut with the number of column you need
cat /etc/passwd | cut -d: -f1,3
Here the file /etc/passwd is being passed to the cut command which separates the input by the : character (d = delimiter) and shows only the first and third column. There are more options, type man cut to see them
*) You can scroll in the console if you hit <SHIFT> together with <PGUP> or <PGDOWN> respectively
*) One can set aliases in UNIX to avoid typing a long command all over all the time. Typing
alias ls='ls -al'
always produces a nice ls output with all details. After setting the alias you only have to type ls instead of ls -al. However, if you would like to use the original command again, after having set the alias, you can precede the alias with a backslash and the command will execute without the alias. In the above case you would type \lsand the alias would be ignored.