Ubuntu Operating System
1. Linux System composition
The Linux kernel software program is used to implement core operations such as CPU and memory allocation process scheduling device drivers, which are oriented to hardware-based
The peripheral program is user-oriented, including analysis of user instruction interpreter Network Service program graphical desktop program and other application software programs
2. Linux Kernel project
Linus Torvalds, the main University of Helsinki, Finland
October 1991, release of Linux version 0.02 (first public edition)
March 1994, Linux version 1.0 released
The logo of the Linux kernel-Penguin Tux, from the Finnish Mascot official website: http://www.kernel.org
Change diagram between the stable version of the Linux kernel and the development version
Note: 1 The development version was originally a stable version of the copy, followed by constant correction of errors, continue to add new features
2 when the development version stabilizes, it will be upgraded to a stable version
3. Peripheral programs for Linux Systems
Most of the peripheral programs that make up the Linux system come from open source software from the GNU Project or other organizations
GNU (GNU is not Unix): launched and created by Richard Stallman in 1984; Designed to develop a complete Unix-like operating system; Official website: http://www.gnu.org
4. GPL and LGPL Agreement
GPL (general public lisence Universal Common license)
Core content: 1. The software must be published in the form of source code, allowing any copy transfer to be used and re-issued new software version
2. If any part of the GPL software is used in the published software project, it will also comply with the GPL, and the source code development allows other users to copy, transfer and modify the use
3. Do not provide any form of liability guarantee and commitment to any user of free software
4. Does not exclude the commercial packaging and distribution of free software, nor does it restrict the packaging and distribution of other non-free software on the basis of free software.
Open source software : The most important feature of OpenSource software (opensource software open sources software) is the open source code
5. Linux System version
Linux Release version composition
Unix-like operating system based on Linux kernel
Linux kernel + various free software = Full operating system
The name and version of the release is determined by the issuing vendor
Red Hat series, published by Red Hat, Debian series, released by the Debian community; Ubuntu series, released by Ubuntu community
6.Ubuntu Linux Overview
Ubuntu was founded by Mark Shuttleworth (Mark Cervos), and Ubuntu was developed based on Debiangnu/linux's unstable branch, with its first version released on October 20, 2004
7.Linux the file system type used by default in
Linux System file system mainly includes EXT4 (fourth generation file extension system for storing files and directory data partition, when Ubuntu default file system used
1): EXT4, 4th Generation Extended (Extended) file system
partitions that store file and directory data
A typical journaled file system
The default file system used in Ubuntu system
2): Swap, swap file system
To establish a swap partition for a Linux system
3): Other file system types supported by Linux
FAT16, FAT32, NTFS XFS, JFS
8.Linux the disk, partition, and other devices are represented as files
A hard disk device in a Linux system that represents the Ide/scsi interface using HDX/SDX, where x is a B-C and an ordinal partition based on the hard disk device file name, after which the number sequence is added (e.g. hda1 hda2)
The hard disk is listed as/DEV/SDD6. /dev/for hard disk directory HD (IDE interface hard disk) SD (SCSI or SATA interface hard disk) d (HDD serial a B c D) 6 (second logical partition) full read: The second logical partition of the fourth SCSI hard disk
Note: The number of primary partitions on the hard disk is only 4 The main partition and the extended partition are limited to 1 ~ ~ , and the ordinal of the logical partition will always be from 5 Start
9. System User Interface
1 ): Graphical interface: composed of a series of windowing applications, providing better ease of operation and visual experience
Ubuntu Desktop Suite Environment for the system graphical interface: Gnome (GNU Network Object Model Environment), KDE (Kool Desktop Environment), XFCE (XForms Common Environment), using GNOME by default
2 ): Command line interface
The character interface of Linux system has been widely used in Enterprise Server field for its excellent characteristics such as high efficiency, stability and reliability. Most of the management of the server, maintenance by remote login.
The default is to open 6 virtual terminals, respectively, as Tty1, Tty2 、...、 tty6
3 ): Switch between graphical interface and command line interface
Using the CTRL+ALT+FN key combination, switch from the graphical interface to the nth virtual terminal of the command line interface, Fn represents the F1, F2 、...、 F6 function keys; Use the ALT+F7 key combination to return from the character console to the open graphical desktop environment
Press ALT+FN key to convert between 6 virtual terminals
Open pseudo Terminal shortcut key for ctrl+alt+t (pseudo terminal provided by Qnome-terminal program needs to run on graphical interface)
directory structure
The directory and file data in the Ubuntu system are organized into a tree-like directory structure, where all partitions, directories, files, etc. all have an identical location starting point-the root directory (denoted by "/")
1 ): Common subdirectories
Directory |
Description |
/boot |
System kernel holds directory boot file and kernel |
/bin |
Bin is a binary (binary) abbreviation for ordinary users using the command |
/dev |
Device interface |
/etc |
Application |
/home |
Common User's host directory |
/root |
Administrator Root Host Directory |
/sbin |
Commands used by administrators |
/usr |
Other user applications |
/var |
frequently changing files (log mailbox directory, etc.) |
2 ): Command prompt for analog terminal
User name
Host Name
Current user's working directory: "~" represents the user's host directory
Current user type: the "$" character indicates that the user is currently logged on as an administrator, and the "#" character indicates that the user is currently logged on
Command prompt, enter various action commands as strings; press ENTER to end the command input and execute
One by one . View System Information commands
Command |
Description |
Uname-r |
View System kernel |
At/proc/cpuinfo |
View CPU |
Cat/proc/meminfo |
View Memory |
Hostname |
View Host Name |
Ifconfig |
View IP |
sudo passwd root |
Change root password |
Su Root |
Switch Administrator |
Shutdown-h Now/poweroff |
Shutdown |
Shutdown-r Now/reboot |
Restart |
Shutdown-r + minutes |
Delay restart |
Ctrl+c/shutdown-c |
Cancel |
Command
Usually only represents the name of the instruction or program that implements a certain kind of function, is a special program running in Linux system, and acts as a "translator" between the user and the kernel; When a user logs on to a Linux system, a shell program is automatically loaded; bash is the default shell program used in Ubuntu systems. ; files located in/bin/bash
Classification
Internal command: Some special instructions inside the Shell interpreter program (such as Bash), also known as built-in (built-in) directives, do not require re-reading of the file from the hard disk, so it is highly efficient
External command: Refers to a Linux system to complete a specific function of the script file or binary program, each external command corresponds to a file in the system, is a command outside the Shell interpreter program.
The default storage directory/bin/sbin.
Ubuntu command Line
Syntax: command word "Options" "Parameters"
Command word: the command name, which is the most critical part of the entire command; the only one that determines a command
( Note:the processing of English characters is case-sensitive in theUbuntu Linux command environment.)
Options : Adjust the specific functions of the command, decide how to execute the command, different command word use different options, multiple options are separated by a space, if you do not use the option, the default function of the command word
short format options: typically use "-" (half-width minus sign) symbol guidance before the option (multiple single-word check items can be combined together) (simple structure, fast input)
long format options: usually use "--" (two-half-width minus sign) symbol guidance before the option (meaning clear, easy to remember)
parameters: Command Arguments are objects that command word processing, and typically command parameters can be file names, directory (path) names, or user names.
Press ENTER to indicate that the command input ends and is submitted to the system for execution; You can edit the character contents of the command line before pressing the ENTER key
experience: In the actual use of Ubuntu command line process, the "options" and "parameters" are often confused, even the order of the back and forth is allowed to reverse, but generally does not affect the execution effect of the command
get command Help
using Help command:The help command is a built-in directive in the Linux shell that is used to view the helper information for each shell internal command
using-help command: Help for most of Ubuntu external commands
using the Mans Manual (Manual page ): is the most common form of online Help for Linux systems, most of the external software at the time of installation for the execution of programs, configuration files provide a detailed Help manual page. Shortcut key Q exit/Find
Man ls | Col-b > Lshelp.txt Save the Help manual for the LS command as a text file Ishelp.txt
Note: the col command program is used to filter some special control characters in text
| The pipeline takes the screen output of the preceding command as the action object of the subsequent command
> Redirect output after the previous command executes successfully, its screen output is saved to the file specified behind the >, rather than directly to the screen.
Basic operations for directories and files
pwd command: view current working directory (print working directory)
CD command: switch working directory (change directory) host directory is the default working directory after Ubuntu user logs on to the system
absolute path: using absolute paths at the root/as a starting point can be a very accurate representation of a directory, commonly used to represent a directory (file) location where the directory structure in Linux is relatively stable (infrequently changed)
relative path: Starting with the current working directory, not using/symbol at the beginning, quick and easy to use
ls command List ( list ): displays content in the directory, including subdirectories and file-related property information
syntax : ls [options] [File or directory ...]
Common Options :
LS displays directory names and file information in a short format
ll display a list of files and directories in a long format
Ls-a display information for all subdirectories and files
Ls–a except. (current directory): All subdirectories and file information outside of (parent directory)
LS–LD display the properties of the directory itself without displaying the contents of the directory
LS-LH Displays the directory or file size in a more user-friendly (human) manner, with a default size of KB
LS-LR displays all content in the specified directory and its subdirectories in a recursive (recursive) manner
Can I use the LS command when I combine a wildcard character? * To improve the efficiency of command writing, Which? You can match an unknown character in the file name, and an asterisk * can match any number of characters in the file name
LS--color in character mode to distinguish different files in color
alias command: simplify commonly used, longer commands with the alias mechanism
Syntax : alias command aliases = command
Example : alias myls = ' Ls–alh ' ( alias is Myls)
Note: "Myls" equivalent to executing "LS-ALH" Command
du command: statistics directory and file space usage (disk usage)
syntax : du [Options] [File or directory ...]
Create directories and files
syntax : mkdir [Options] directory location and name ...
Mkdir command to create a new directory (make directory)
Mkdir–p creating nested Multilayer catalogs at once
Touch command to create an empty file
In command Create key link file (link)
Soft links (Symbolic Links) apply to files and directories, and must be explicitly specified with the-s option when the original file is deleted and the soft link is invalidated
Hard links can only be used for files, hard links and original files must be in a file system (Linux partition), deleted original files are still available
1 ): Copy Delete move directory and file: rebuild the file or directory (source) you want to copy and save it as a new file or directory
Grammar :cp [Options] ... source file or directory ... Destination file or directory
Note: When copying multiple files or directories, the target location must be a directory and the destination directory must already exist
2 ): Deletes the specified file or directory
syntax : RM [option] To delete the file or directory ...
Common options :-F: Force delete directly
-I: Remind users to confirm when deleting files or directories
-R: Used when deleting a directory, indicating recursive deletion of the entire directory tree
Find files and directories
1 ): Search scope by environment variable PATH decision :Echo $PATH (command to view user environment variables)
which command to find the directory where the command file that the user executes is stored
Grammar :which command | program name (default when finding the first target no longer continues); WHICH-A Command | program name (if you want to find it in all search paths)
Note: When you use which to find internal commands, the corresponding program is not found
2 ): Use recursion to refine the search based on the target's name, type, size and other attributes
Grammar :find [Look in] [find criteria expression]
Note: Use wildcard characters? * It is best to extend the file name with double quotation marks when you need to use more than one lookup condition, each expression can be represented by the logical operator "-a" "-O" respectively, and(or) .
Initial Linux system--ubuntu