Satellite Internet
Wireless Internet
Fiber Optic Internet
High Speed Topics
Bookmark and Share

Home > Articles > UNIX Basics

UNIX Basics


UNIX was developed in 1969 by AT&T Bell Laboratories and is an extremely powerful and versatile operating system. It can run on a wide range of hardware, which most other operating systems cannot. Presently, UNIX is widely used in universities, mid-sized organizations, and the servers of most Internet Service Providers. UNIX is primarily used for workstations, and not so much for PCs.

UNIX’s modular construction allows users to modify it quite easily. Interestingly, the language ‘C’ was created specifically for the UNIX operating system. In the years that followed, UNIX was completely re-written using ‘C’, and feature-sets such as multiprogramming and time-sharing were added to the operating system. Portability and the ability to create pdf files were other unique features that made UNIX so popular in the coming years.

 

Basic UNIX Commands & Tools

When using UNIX, there are certain commands as well as options that are very useful to the user. Some of the most commonly used UNIX commands are Tail, which displays the last part of a file; Head, which shows the file’s beginning; Lsof, where open files are listed; Nmap, which is a network scanning command; Calc, which invokes a calculator program; Time, which shows the time when a command was executed; Locate, which is a command to locate files; and Last, which displays the name of the user who last logged on to the system.

Additionally, there are some key network tools and programs that will enable you to operate UNIX more efficiently. Some of the more important network tools include Netstat, a network information command; Tcpdump, which displays the current traffic in the network; and Ping, which checks the status of the host. A few useful program commands include Ispell, which is a spell checker, and Dict, a dictionary tool.

 

UNIX Command Line Techniques

There are also several useful command line techniques that will make your UNIX experience more efficient. Some of these command lines are as follow:

  • Instead of defining the directory trees one at a time, you can try to define all directory trees by using just a single command. For example, you can use ~ $ mkdir -p tmp/d/e/f to make directory trees in one go.
  • Combine your commands with control operators. Placing a semicolon ‘;’ between commands will allow you to combine your commands. Although it works most of the time, sometimes it may not. That is why using command operators is a better option. Two of such command operators are ‘&&’ and ‘||’. They are often used to combine two commands, in which the second command can only run after the completion of the first command.
  • Be careful when you are quoting variables as the shell may sometimes interpret the text as an extension of your variable name. This will make the system return a null value. Therefore, to prevent this from happening, ensure that a variable name with an alphanumeric text is enclosed by braces like ‘({})’.
  • To manage long input, make sure that you use escape sequences. The backlash is very helpful for managing multi-line wrapping. The backlash ‘/’ is used for joining a very long line of command to the next line. Hence, using backlash to connect successive lines of command will be interpreted by the shell as a single long line. With backlash, the long input lines make more sense.
  • Try using a sub-shell to run a list of commands. Enclosing a list of commands in one group with parenthesis will make the commands run in a new sub-shell. This will enable you to collect the whole output or redirect.
  • When it comes to background shell commands, there are certain applications that work better when they are run as background daemons. Using the ‘<&-‘ closes the standard input, and it allows the applications to run as background daemons. To prevent a daemon from starting in another system, it is advisable that you alter the working directory to ‘/’.

Besides these useful tips, you can also use ‘apropos’ and ‘man’ commands to compare files and check whether they are identical. To work in emacs with two windows, type Ctrl-x 2, and the second window will be opened. Typing Ctrl-x 1 will make the first window appear again. If you want to view a Microsoft Word file in UNIX, you should use the ‘Soffice’ program.

If you need to download this program and use dial up Internet it will take a little time to complete; however, if you use High Speed Internet service it will be much faster. To search a specific word in any .tex document, you can make use of the ‘Looktex’ program for UNIX. Also, right clicking and choosing the ‘Grab’ option form the ‘xv’ menu, which will give you a screen-shot.

If you don’t use smart command-line techniques such as the few of them that are mentioned above, you will still be able to work on UNIX. However, frequently using command-line techniques will speed up your work and prevent unexpected errors too.

 
Our Most Popular Pages
 

You can also use our guide to compare different forms of High Speed Internet service, such as broadband cable, DSL connections, or modern fiber optics.