Introduction to Basic UNIX concepts

Source: Internet
Author: User
& Nbsp; you must have an account on workstation before using UNIX. When login appears, enter the account name and password. now you have completed the login operation and entered UNIX. After entering, the system will start the shell, which will accept your


Before using UNIX, you must have an account on workstation.

When login appears, enter the account name and password. now you have completed the login operation and entered UNIX. After entering, the system will start "shell". This program will accept your commands and execute it. there are several shell types, csh, tcsh, sh, bash, ksh ..., I mainly mean csh. Basically, the commands we want to talk about are all input in shell. The commands for the talks are all input in shell.

When you enter the set command, you will see some variables and several important ones:

Home: home. Home is your place. you can place any stuff in this directory. When you enter the system, you must first come here.

Path: path. Generally, the execution files are placed in different places, and the system will find the execution files one by one based on the directories in the path.

Term: terminal. Indicates the current terminal form, commonly used vt100, vt102, ansi.

Set = xxxx to set the variable value. $ represents this variable.

Example: setterm = vt100
Setpath = ($ home/bin $ path)
Echo $ term vt100

□File system introduction

The UNIX file system is in a tree structure, including Directory and file ). If you have been in touch with DOS before, you should be familiar with it. if not, you should take a closer look.

1. basically, directories are used to classify files.

The directory can contain many files or many directories, and these lower-level directories are called "sub-directories" (subdirectory), which are also of the phase nature. The hierarchy of branches composed of these directories looks like a tree, so it is called a tree structure, and the top directory is called "root directory ″.
When a directory is created, it has two basic projects: "." and ″.."."." It refers to the directory itself, and "..." refers to the directory on the previous layer. These two directories have always existed along with the directory.
This is a summary of the file system. it looks like a tree!

Joe .....
│ Alibaba Mail technical joe
│ Mary
Invalid-users login Tom login Eric
│ Includead. letter
│ Every Mary has Mail .....
│ Examples.../examples-bin examples ls
│ ├ Mail
│ ├ Rm
│ └ Cp
Upload-tmp

2. a file is the place where data is stored. the file may be a text file or an executable program or a file with different functions, with different attributes, let's take a look.

% Ls-l

Total1059
Drwx ------ 4 jong 512 Sep614: 54 Mail
Drwxr-xr-x2 jong 512 Oct2219: 02 News

There are 10 words in front of each archive. The first character is the archive form. The first character is the directory, the first character is the directory, the second character is the file, and the second character is the link file.

From 2 to 10, there are three groups of attributes and three characters in total. A group of three characters indicates <read, write, and execute>, that is, rwx.-The table does not have this attribute. The first group is owner, the second group is group, and the third group is others.

Rw ------- only the owner can read and write data.
R-xr-x can be read and executed, and cannot be written.
Rw-r -- owner can read and write files. Other readable file names can be used in addition.

The file starts with a "." file is a hidden file, which is usually invisible. use ls-a or ls-al to view the file.

□Process)

A program in progress, which is called process.

UNIX is a multi-Job System (multitasking) that can run multiple programs at the same time, so that several people can use the system and run the program at the same time.

There are two types of programs:

Foreground execution (foreground) and background execution (background ).
Generally, we run the program in shell and wait until the program ends before entering the command. this is the foreground execution.
If we don't want to wait for the program to end, or the execution time is too long, we can put the program into the background for execution, and the system will automatically execute it, and you can do something else. How can we put the program into the background? You only need to add "&" to the end of the command. Once you run the program on the background, the system will return "[n] xxxx", n is jobid, and xxxx is processid. Each process has a processid and does not have a duplicate. To stop the program that runs in the foreground, press CTRL_C to stop the program. to pause the program, press CTRL_Z to temporarily stop the program. to resume the execution, use fg or bg to determine the foreground or background for execution.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.