Guide to Unix

These are the basic knowledge of unix and linux for novices with this type of operating system. Our basic tutorial series will introduce the most basic knowledge of UNIX / Linux commands.

QuanTriMang - These are the basic knowledge of unix and linux for novices with this type of operating system. Our basic tutorial series will introduce the most basic knowledge of UNIX / Linux commands.

What is UNIX?

UNIX is an operating system developed in the 1960s. It is a multitasking, multi-user and stable system for servers, workstations or laptops.

UNIX systems also have a similar graphical interface (GUI) like Microsoft Windows, making it easy to use. However, you still need a lot of knowledge required for UNIX operations, which are not described by a graphical program, or as there is no window interface, for example in a session telnet.

Unix types

There are a number of different versions of Unix, but they have many things in common that are shared with each other. The most common differences with Unix are Solaris, GNU / Linux and MacOS X.

Guide to Unix Picture 1Guide to Unix Picture 1 Unix operating system

The Unix operating system is built on three main parts: kernel, shell, and programs.

Kernel

The Kernel of Unix is ​​like a hub of the operating system: it defines the time and memory for programs, manages files and communication issues to serve calls. of the system.

As a demonstration of how the shell and kernel work together, suppose that a user types rm myfile (the command works to delete the file named myfile ). The shell will search the file banks for files including rm programs, then ask the kernel, via calls, to execute the program rm for the myfile file. When processing rm myfile ends, the shell will return a Unix prompt% to the user, indicating that it is in the state of waiting for the next command.

Shell

Shell works as an interface between the user and the kernel. When a user logs in, the login program will check the username and password, then start another program. Shell is a command line interpreter (CLI). It interprets the commands that the user typed in and arranged them to execute. The commands themselves are programs: when they are finished, the shell returns to the user a different command prompt.

Experienced users can customize their own shells and users can use other shells on the same computer. Employees and students in schools can choose the default tcsh shell .

The tcsh shell has features that help users in entering commands.

Filename Completion - By typing part of the name of the command, file name or directory and pressing the [ Tab ] key, the tcsh shell will complete the rest of the name automatically. If the shell finds multiple names starting with the characters you typed, it will signal you to type some more characters before pressing the tab key again.

History - shell keeps a list of the commands you typed in it. If you need to repeat a certain command, use the cursor keys to scroll up or down the list or type history to see a list of previous commands.

File and processes

Everything in UNIX is a file or a process.

A process is an executable file identified by a unique PID (process identifier).

A file is a collection of internal data. They are created by users using text tools, running compilers, etc.

Examples of files:

  1. A document (report, essay, .)
  2. The program's text has been written in a number of high-level programming languages
  3. The instructions are easy to understand directly for the device and are not easy to understand for less experienced users, for example, a collection of binary numbers (binary files or executable files);
  4. A directory, containing information about its content, can be a mix of other directories (subdirectories) and original files.

Directory structure

All files are grouped together in a directory structure. The file system is arranged in a hierarchical structure, like an inverted plant. The top of the traditional architecture is still called root (written as a slash).

Guide to Unix Picture 2Guide to Unix Picture 2

In the diagram above, we can see the home directory of an undergraduated " ee51vn " student consisting of two directories ( docs and pics ) and a file called report.doc .

The full path to the file report.doc is " /home/its/ug1/ee51vn/report.doc "

Start with UNIX terminal

To open an UNIX terminal window, click on the "Terminal" icon from the main menu of the operating system.

Guide to Unix Picture 3Guide to Unix Picture 3

The UNIX Terminal window will appear with a% prompt, waiting for you to enter your commands.

Guide to Unix Picture 4Guide to Unix Picture 4

( Also )

4 ★ | 2 Vote