Getting started with Linux
First, the composition of the Linux system
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5C/90/wKioL1UdUsTwGIcxAAC0CRkz3i4058.jpg "title=" 1.png " Width= "height=" 266 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:250px;height:266px; "alt=" Wkiol1udustwgicxaac0crkz3i4058.jpg "/>
1, library (Lib): system call to carry out 2 times encapsulation is equivalent to an interface, is the call of the library (full-featured).
2, Application (learning is the application level)
(1) Common applications such as GCC, vim, user management, network management, grab tools and so on to complete a certain type of work tools.
(2)The Shell is an interactive interface in its broadest sense and the interactive interface is divided into
Graphical Interactive Interface ( GUI):xwindows,GNOME, KDE, XFCE,
the interface for the command line interaction ( CLI): bash zsh csh
3. Terminal:
Physical Terminal: A device that is physically present, connected to a local connector, such as a keyboard, mouse, and so on.
Serial Terminal: A device that connects dial-up remotely through a serial telephone line.
Pseudo-terminal: On the system, through the software simulation link, can direct the remote host to work the device.
Virtual Terminal: A total of 7 virtual terminals
Ctrl+alt+f1~f6 6 Virtual terminalswith command line switching; Ctrl+alt+f7 is a graphical virtual terminal.
Linux is a multi-user Multi-tasking system .
Second, environment variables
Environment variables: Settings for users using the operating system environment
$ is a reference to a variable, and each variable must be preceded by a $, shell type (that is ,a variable) that is used by the current user .
Command line interface:
# command prompt, prompt for administrator command
$ Command Prompt for normal user prompt
[root @ localhost ~] Root is the Super Administrator user name,@ is the output,localhost is the hostname,~ represents home directory
The echo echoing command Displays the echo back as it is.
[root @ localhost ~]# echo $ PS1
[\[email protected]\h\ \w]\$
where the echo $ PS1 command refers to the "root @ localhost ~" style representation,PS1 is the string variable refers to the command prompt line display format. W refers to the working directory.
Third, some features of bash (use of shortcut keys)
CTRL + C skips the current command does not perform the current command who views what users are currently in the system
Shift+pageup on-page TTY display terminal type
Shift+pagedown Next page ":" is a delimiter
history Show Historical Commands
Four, 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 in the form of files to operate
How the file works:open ,delete, write ,close, read
It is called the same way, flattening the differences between the hardware.
2,Linux is composed of a number of functions of a single program
development is simple, the shell script is written, and the system is called by multiple shell runs.
3, minimize and user interaction
All commands are to invoke and execute the application, i.e. the input command will display the result directly.
4.use text files to save configuration information
Five, in what files are in the application in Linux
1, binary files (application files) directly can run files, generally in the/bin directory;
2, library files , generally under the Lib ;
3, Help file, some help information, such as man ls to list The help information of LS;
4, configuration file, a program for a specific operation, how to do, is through the configuration file.
Six,the OS is composed of file system, process management, memory management, network functions and so on, namely OS function.
File system: Defines how and how data is stored on a hard disk, and is an important means of accessing information on disk, such as driving hard disk work, managing how hard drives work, and so on.
Linux file system has ext2 ext3 ext4 , etc., the file system is created is formatted.
Seven, Linux Directory
Absolute Directory: The way a file is accessed directly from the root, called an absolute path . /aa/file1
Relative directory : A relative path is called by the way to the destination directory from the working directory (the current directory). aa/file1(pwd Displays the current working directory)
Top-level directory : Root directory/first- level directory /
Summary of the above orders
TTY Displays the type of terminal used by Echo echoing command
Who shows which users of the current system are logged in pwd displays the current working directory
Shell types currently used by the shell system
PS1 The display format of the command prompt line
Nine, Linux Command Format
#/$ Command options (option parameters) command Parameters
1. Command: Initiating a command is a request to the kernel to run a binary program as a process.
built-in command,Shell bash comes with.
external commands, separate applications, are not written in the Bash command.
PATH environment variable, which records the directory in which the application resides
Press two tab to complete the command, is in the PATH below the search, if not found will show command not found
Type to see whether the command is built-in or an external command.
Example:type TTY
2. Options: Specify how the command runs
The form of expression is divided into:
Short options : "-" + letters, such as -A, short options can be combined to apply, such as ls–a Ls–l=ls–la.
long option: "- -"+ words, such as --help."
3.parameters: The Action object of the command (parameter without the bar)
Summary of commonly used commands:
Type Command Arguments (name of some commands)
CD Switch Directory
CD- return to the previous directory
CD ~ user name back to home directory of username
". " current directory
". "Parent Directory CD: return to the top level directory
LS lists all files or directories in the current directory
to . files that begin with are called hidden files
Ls-a lists all files in the current directory, including the. the hidden file at the beginning.
Ls-a display except ". "and". "All files outside.
Ls-l lists the details of the file.
Ls-la (combination app for short options) details All files that contain hidden files
Ls-h Change the file size to be able to recognize other units
Ls-r recursively displays files for the current directory
Ls-r Reverse (inverse recursion) display ( may be used when scripting)
input ls–la Command (emphasis)
Show -rw-r--r--. 1 root root 27632 Apr 1 18:16install.log
where -rw-r--r-- is the file permissions ,1 represents the number of hard connections,root owner,root Group,27632 is File Size (the default unit is bytes), APR 1 18:16 file Last modified time,install.log to file name
Getting Started with Linux