First, the composition of the Linux system
1, computer hardware--Von Joyman's five major hardware: CPU (Calculator, controller) memory, I/O (input device, output device)
2, the Linux kernel ("kernel" refers to a hardware abstraction layer, disk and file system control, multi-tasking and other functions of the system software)
3, library--lib (library call: Simple is called the system call 2 times, is actually an interface)
4, the application (most of our learning is the application level)
① Common Application (refers to the computer program for accomplishing one or more specific tasks, it runs in user mode, can interact with the user, has a visual user interface, such as GCC vim, etc., more professional. )
②shell (Broadly speaking is the interactive interface)
The shell is divided into two categories
1. Graphical Shell=gui (Graphical User Interface): Xwindows, CDE, GNOME, KDE, XFCE.
2. Command line Interface: bash/zsh/csh (these three commonly used) tcsh, CSH, Ash, BSH, ksh, etc. shell=cli
Note: Some features of bash (Bourne-again SHell) Bash (common shortcut keys)
CTRL + C skips the current command without executing the current command
Shift+pageup on page
Shift+pagedown Next Page
History Show historical commands (subsequent additions)
Second, environment variables
Environment variables: User settings for the environment using the operating system
[Email protected] ~]# echo $SHELL The type of SHELL the current user is using/bin/bash
Note: If you want to reference a variable, each variable must be preceded by a $
Command Prompt in Linux
#命令提示符--Prompt for administrator commands, prompt for prompt-to-normal user
[[email protected] ~]# echo $PS 1 Display the command prompt line display format [\[email protected]\h \w]\$
Note: [\[email protected]\h \w]\$ meaning: \u refers to the current user name, \h refers to the name of the host, \w refers to the directory, ~ refers to the home directory
Third, the philosophical thought of Linux
1, all documents (all appearances are displayed in the form of documents)
Benefits: 1, CPU disk DVD and so on can be operated in the form of files, the advantage is to grind the differences between the hardware
How the file works: Open Delete Write close read
2, Linux is composed of a number of functions of a single program
Developing simple shell programming
3, Minimize and user interaction
Who is currently logged on to the WHO system
All commands are invoked and executed in the application
4. Use text files to save configuration information
Note: The beginning of the study may not be very clear, but learned long should be aware of the
Iv. composition of applications in Linux
1. Binaries: Files that can be run directly (under the/bin directory)
2. library file (Lib)
3. Help file (example: Man ls)
4, configuration file (for specific operation, how to do, is through the configuration file)
V. File system and Directory concepts
File system: It is the way and data structure that defines how files are stored on disk, and is an important means of access and preservation
Linux file System ext2 ext3 EXT4, etc. (tip: File system creation is formatted)
The concept of a catalog
Absolute directory, (access a file from the root, called an absolute path)
Relative directory (relative path)
Top-level directory (root directory \ directory \)
Vi. Use of commands
Use format: (#/$ command option (option parameter) command parameter)
① command: To initiate a command is to request the kernel to run a binary program as a process, the command is divided into 2 categories:
1. Built-in command: Shell Bash comes with
2. External command: Separate application, not written in bash command
Type determines whether the built-in command is built-in or an external command
[[Email protected] ~]# type TTY TTY Is/usr/bin/tty [[email protected] ~]# type echo echo is a shell Builtin
easy to ignore: The PATH environment variable refers to the directory in which the recording application resides
Two times the tab completion command is searched under path, and if not found, command not found
[[email protected] ~]# echo $PATH display environment variables/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin :/usr/bin:/root/bin
② option: is to have the command run in any particular way (divided into 2 types)
Example: Ls-a
Short option-A
Long option--help
③ parameters: Manipulating objects that are understood as commands
[Email protected] ~]# ls-a/home/. .. Lost+found
Vii. Common Commands
PWD (Print work directory) view current working directories
TTY displays the type of terminal used
Who shows which users are logged on to the current system
Echo Echoing command
CD Switch Directory change directory
CD ~ Represents the user's home directory Super admin root directory in/root normal user's home directory/home/user name
CD-Return to the previous directory
CD ~ User name back to home directory of username
Cd. Current directory
Cd.. Parent directory (return to top level directory)
LS lists all files or directories in the current directory
Note: Files that begin with. are called hidden files
LS-A lists hidden files in the current directory, current files, directories, parent directories
-A does not display the current directory and parent directory and displays the currently hidden files and files
-L Detailed description of these files (details listed)
-la short option combination app detailed list contains hidden files
-l-a function Ibid.
-H Change the file size to be able to recognize other units
-R recursively display until the last file is displayed
-R reverse display (may be used when writing scripts)
[Email protected] ~]# Ls-la install.log-rw-r--r--. 1 root root 27632 Apr 1 18:16 install.log
-/D-Represents the file, D stands for the directory
rw-r--r--Permissions
1 represents the number of hard connections
The owner of the root file is root
The root file belongs to the same group as the root group.
27632 file size is 27632 bytes default unit is byte
APR 1 18:16 The time the file was last modified
Install.log file (directory) name
Statement: This blog All technical papers are implemented in the Centos6.6 x64 system, the text does not involve the knowledge points will be added in the post-learning
This article is from the "Journeys By chance" blog, make sure to keep this source http://meaningful.blog.51cto.com/4543452/1627832
Linux Introductory first lesson