• Aucun résultat trouvé

Quick Introduction to UNIX

Dans le document Td corrigé 45. Token Ring pdf (Page 193-197)

46g. Token Ring Problems

51. Quick Introduction to UNIX

UNIX is an operating system similar to DOS. It can run on IBM PCs, Sun Workstations, HP computers, etc.. It has been ported to many environments. It is also a multiuser environment.

Several users can access the same machine simultaneously.

The purpose of this section is as a basic introduction to Unix and the reader should be aware that there are many in-depth books written on Unix that are available on-line and off-line.

History

The name Unix is not an acronym but a pun on an early operating system called Multics. Unix was original thought of as an emasculated version of Multics (called Unics).

Unix was developed in the early 70s by Bell Telephone Laboratories. Unix was developed using the C language and is easily ported to other platforms. Unix is nonpropriertary - it is not tied to a specific software vendor or tied to a specific hardware platform.

Design of the Unix System

The Unix system consists of the kernel system layer atop the hardware.

The essential core of the Unix operating system is called the kernel. This is the software layer that interacts most closely with the computer hardware. The command interpreter which

implements the users commands is called the shell - this is similar to DOS's command line. The shell can also be a GUI (Graphical User Interface) like X Windows.

Also on top of the kernel would run user applications and utilities. Utilities are print managing programs, format commands, etc...

One of the main reasons that Unix has become so popular is the layered approach that the Unix operating system has taken. This has made it very easy to port to other hardware systems.

Unix Variants

Because Unix is nonpropriertary, and has been modified by thousands of programmers at Bell Systems, universities and research organizations around the world, there are may variants of Unix.

The most popular flavours of Unix are (in no particular order):

Linux

These Unix variants are descendants of the original AT&T Unix code.

Other operating systems are Unix-like in that they have been written from scratch to emulate the behaviour of some versions of Unix. Examples are: Coherent and QNX.

Personal Unix Systems

Unix can be run on IBM PCs, the most common implementation is LINUX. Linux is available off the Internet for free from various distributions. All distributions have the same basic kernel called Linux. The distributions package the Linux kernel with the programs that they feel will provide the best overall package. The programs that they add are custom installation programs, office packages, programming suites, server software, networking software, games, etc..

The most common distributions are (in no particular order):

Slackware

The Command Line tells Unix what you want to do. Unix's command line tends to be cryptic and most users use some sort of GUI.

GUIs

GUIs are graphical user interfaces, they all have a look and feel similar to the Windows environment which is based on the MAC Desktop and X Windows.

A graphical user interface for Unix consists of 2 major parts: the X Windows System (often called X) and a Window Manager. An X server on a computer system manages the screen, keyboard and mouse and their interactions with client applications that reside either on the same system or on another computer on a network.

The window manager, a client application, controls the window decorations and behaviours such as resizing, stacking order of multiple windows.

XFree86 is the free X Windows system that is available with Linux. There is a wide choice of free Window Managers available:

OSF/Motif is the most popular commerical window manager for Unix vendors other than Sun.

Motif is based on the work done by members of the Open Software Foundation (OSF). Motif is also the interface for Open Desktop (ODT) from the Santa Cruz Operations (SCO).

Case Sensitive

Unix's command line is case sensitive. Most commands and responses are presented in lower case letters. Unlike DOS and many other systems, you cannot use upper case letters when lower case letters are expected. Thus typing "LS" to list a directory instead of "ls" will result in an error (the command won't be found). This is especially true of passwords - make sure that when you enter a new password that you remember whether it is upper case or lower case!

Multi-User Operating System

Unix systems run comfortably in a variety of situations: single-user, host systems with users on local or remote terminals and networked arrangements of workstations and multiuser systems.

Multiple Operating Systems

One of the most attractive features of the personal Unix systems is their ability to run programs designed for other operating systems. Versions of Unix designed for IBM PCs lets you load DOS and Windows applications using progrmas (such as dosemu and wine respectively) and run them in windows along side Unix specific programs.

Unix is a Pre-emptive Multi-tasking environment. You can have several programs or processes running simultaneously. This also allows Unix to be a multiuser environment.

File Naming Conventions

Once again Unix is case sensitive which is a difficult area to get used to when you migrate from the DOS environment.

File Name Length

Unix allows up to 255 characters in the file name as opposed to DOS's 8.3 convention. This allows for unique and informative file descriptions rather than the encryptic file names used in DOS.

There is a problem with having long file names if you are working from the command line.

Typing in a file name with 255 characters and keeping the case correct can be very frustrating. It is recommended that you keep the file names short and sweet and also use DOS's naming

convention if you are going to transfer files between DOS and Unix (very common occurrence).

Allowable Characters in Filename

Only the "/" (forward slash) is not allowed in filenames because it is used as the pathname separator (DOS uses the back slash "\").

Characters to avoid: ? @ # $ ^ * ( ) ` [ ] \ | ; ' " < >

You can use spaces or tabs in filenames if you enclose the names in quotation marks on the command line but they are hard to work with. Use underscores or periods to get visual separation.

Ex. "this is my file" or my_file_is_this_one or here.is.another.file

Don't use - or + as the first character of a filename. Many commands use the - or + to introduce options or switches.

Filenames starting with "." are used by the system to make names invisible to normal directory listings. Typically, preferences or configuration files are "hidden" using a "." prefix. An example is ".signature" used for your electronic signature in E-mail.

Pathnames (/)

Unix uses the forward slash "/" as the pathname separator. Unix's top directory is called the root directory and is indicated by "/".

Compatibility with Other Systems

If you are going to use Unix with other systems such as DOS, make sure that you follow a file naming convention that is compatible with both systems. It is possible that characters that are allowed in one system may not be allowed or reserved in the other system.

DOS only allows 8 characters followed by a 3 character extension while Unix allows up to 255 characters. When transferring from DOS to Unix there is no problem. But when transferring from Unix to DOS, the Unix filename becomes truncated and converted to the 8.3 format.

Ex. Unix: "this_file_is_ver01_of_pkzip" becomes "this_fil.e_i" in the DOS world.

Wild Cards

Unix allows wild card characters in the file names similar to DOS. The Wild cards allowed are the asterick "*" and the question mark "?".

For example:

ls *xt will list all files ending with xt regardless of filename length.Such as:

cat_text readme.txt

ls ?xt will only list 3 character long filenames that end with xt. Such as:

txt cxt

Dans le document Td corrigé 45. Token Ring pdf (Page 193-197)

Documents relatifs