Gui:graphic User Interface Graphical interface
Windows
X-windows: Graphical Display protocol
Gnome
Kde
Xface
Cli:command Line Interface
Sh
Bash
Csh
Ksh
Zsh
Tcsh
Google:
Linux Filetype:pdf
Linux site:ibm.com
Google hack
IDE: Development environment used by programmers during development;
DLL: Dynamic link library
. so:shared Object
The most critical application of the operating system is the shell, what functions are required, and what functions are added.
Essentially, the operating system is very small.
Login
User name: User ID, user identifier, user name cannot use authentication mechanism
Authentication mechanism: Authentication, identifying and distinguishing a person is the person that is generated.
Authorization for resource access: Authorization
Audit: Audition (form of log)
Prompt: Command prompt:
Command:
Magic Number: A token that marks the format of the second-order execution.
Shebang
#!/bin/bash
#command options. arguments.
Options: Modify the execution effect of the command
Short options
Long options
Parameters: The Action object of the command
List:ls
List lists
Folder: directory, is a path map.
Directory: Also a file, is a path mapping
Path: The location that passes from the specified starting point to the destination. Just to implement a hierarchy of file management mechanisms.
File system: FileSystem, hierarchical management mechanism
List files under the specified path
From the root to find, called absolute path.
Find another location from one location, called a relative path. A node from the root to the destination, relative to the path at the current location.
Current directory, working directory: working directory,current Directory
File name is not the data of files? is also data, but not the data of the file itself, the filename is placed in? Where is the file data placed?
LS lists the contents of the default current directory
Pwd:printing working directory, current path, used/represented on top of Linux
Blue is the directory, green is with execute permission
Ls:
-l,long, long format, display full information
File type: the
-: Normal file (f)
D: Catalog file
B: Block device files (blocks)
C: Character device file (character)
L: Symbolic Link files (symbolic link file) soft links
P: Command pipe (pipe)
S: Socket file (socket)
File permissions: 9-bit, every 3-bit group, each group: rwx (Read, write, execute), rw-
Number of hard links to files
Owner of the file
Genus Group of files
File size (size) The default unit is bytes
Timestamp (timestamp): Last Modified Time
Access: Access
Modified: Modify Change the contents of a file
Changed: The data of the change attribute is also called Meta data (metadata)
Filename
-H: Do unit conversions
-A: Show hidden properties (All) hide files with. start
. Represents the current directory
.. Represents the previous directory
-A: Displays all files, including hidden files, but does not include. Or.
-D: Display the directory's own properties
-I: Displays the index node number of the directory
Index node, inode each file has a file index
-R: Show files in reverse order
-R: Recursive display (recursive)
Cd:change Directory Switch Directories
Home directory, home directory, after the CD without any parameters back home directory or add ~ cd~ Plus user name, access to other user home directory, only administrators have permission.
Cd~username: Enter the home directory of the specified user
cd-: Switch back and forth between the previous directory and the current directory
Linux Command type:
Built-in command: (shell) built-in which LS
External command: An executable file corresponding to the command name on a path in the file system.
Environment variables:
What is a variable? A variable is a namespace for memory. The process of putting data is called variable assignment
Name =jerry, which is used only in the current program.
Path: A bunch of used: separated paths.
Hash: Caches commands and remembers all used commands. Hash is king, cache for the king, looking for cache than directly to find the command faster, is to achieve system acceleration.
Hash table, is the key value to O (1), no matter how long your queue, look for the time is the same, instantly found.
Type: Shows which type the specified command belongs to
Date: Time management, showing the current time of the system
Linux: Fourth dimension, representing the timeline
The time now depends on the crystal oscillator to be timed. The time difference is only one second.
RTC, hardware time.
NTP: Network Time protocol.
Linux boot through RTC read time, boot, no longer use RTC, with crystal oscillator to calculate the time
Hardware clock:
Software clock:
How do I use the date command to modify the current time?
Get help with the use of commands:
Help for internal commands:
Help COMMAND
External command:
COMMAND--help
Command manual: Manual
The man COMMAND, the text document, is compressed and stored. The man is followed by a number, which indicates the section of the command.
Sub-chapters:
1: User command (/bin,/usr/bin,/usr/local/bin)
2: System call
3: library Call
4: Special file (device file) is a kind of relatively unique file, is a device access to the portal exists.
5: File format (config file is similar to variable, define program execution options, config file syntax)
6: Game
7: Miscellaneous: Miscellaneous,
8: Administrative commands (usually located in/sbin,/usr/sbin,/user/local/sbin)
Whatis command, view commands appear in the first few chapters
[] A command that expands in parentheses to indicate that it can be omitted.
Band | Indicates a multiple selection
<> indicates that the content must be given, not optional.
... Indicates that multiple or multiple options can be used.
{}: Indicates grouping, no special meaning
Mans:
Name: command names, brief description
Synopsis: Usage notes, including available options
DESCRIPTION: A detailed description of the command function, including the meaning of each option.
Options: Describes the meaning of each option.
Files: The configuration file associated with this command
BUGS: Who reports Bugs to
EXAMPLES: Use the example.
See ALSO: Another reference
Flip Screen:
One screen back, SPACE
One screen ahead, b
Line backward: ENTER
Forward line: K
Find:
/keyword
N: Next
N: Previous
? KEYWORD
N: Next
N: Previous
Date
Date +%y
Date +%d
Date +%t
Date +%f
Date +%y-%d-%t
Date +%s
Date +%s
Hwclock
-W: System-based
-S: Subject to Hardware
Online Documentation:
Info COMMAND info is a complement to man
/usr/share/doc
Inside the matter do not ask Baidu, Waishibujuewengoogle:google
Own hands, diligent hands, good at summing up.
To be able to tell others clearly, be willing to help others. 10 minutes on stage, ten years under the table.
Apache, with related books, Hadoop,
Cal:calendar
Practice:
1. Echo is an internal command or an external command
2, the use of help, function is what and role
3, how to change the line display?
Printf
The file command and its usage.
Windows:pe
Linux:elf
Directory Structure of Linux:
Inverted tree shape
File system:
Rootfs: Root file system, preached throughout King Tu. /
Indicates that the file is a leaf node, or a special node, all files exist in the directory or found through the directory.
FHS: File system hierarchy standard, Linux distributions should create which files are stored in those directories
LS/view subdirectories under all roots
/BOOT:INITRAMFS-2.6.32-431.3.1.EL6.X86_64.IMG Memory Disk
vmlinuz-2.6.32-431.3.1.el6.x86_64 kernel, and grub (bootloader boot loader)
/dev: Device files
Device files:
Block device: Random device, can achieve random access, does not matter successively, data block
Character device: Linear access. by character.
Device number: Main device number (major) and secondary device number (minor)
The yellow font is a special file.
/etc: location where the configuration file is stored
Home directory for users, the home directory of each user defaults to Home/username
/root: Administrator's home directory, only root. In the production environment, it is not recommended to use root login, using normal user login.
/lib: library files and kernel module files (static libraries and dynamic libraries)
Static Library:. A
Dynamic library:. dll,. SL, (Shared object)
/lib/modules: Kernel module files, libraries are some of the encapsulated features that are called.
/media: mount point directory, mobile device
/MNT: mount point directory, additional temporary system
/MNT: Miscellaneous
/OPT: Optional directory, third-party program installation directory
/proc: Pseudo file system, essentially nothing in the file. The mapping file for the kernel. Kernel working parameters, statistics and so on.
/sys: Pseudo file system, a property mapping file associated with a hardware device, typically implements hardware management.
/tmp: Temp file system,/var/tmp
/var: a variable file. Cache: Cached. Lock file locks, Mail: Right-click Dump location
/bin: Executable file, user command
/sbin: Managing Commands
/usr:shared,read-only, storing read-only files.
/usr/bin
/usr/sbin
/usr/lib
/usr/local:
/usr/local/bin
/usr/local/sbin
/usr/local/lib
Naming rules for file directories and directory files:
1, the length can not exceed 255 characters;
2, can not use/when the file name;
3, strictly distinguish between the case;
Relative path:
Absolute path:
Operating system:
File Management
Change and delete
Directory Management
Ls
Cd
Pwd
mkdir: Creating an empty Directory
-P: Automatically create no directories
-V: More information
Mkdir-pv/root/x/y/z
MKDIR-PV/MNT/TEST/{X/M,Y} command line expands, and the curly brace command line is encountered to expand automatically.
There is also a wave line spread, such as ~username, automatically return to the home directory
{A,b}_{c,d}
/root/x/y/z
#tree: Directory Structure tree
Delete directory: rmdir (remove directory)
Delete Empty Directory
-P
File creation and deletion:
#touch: The main time stamp is modified.
-M
-A
-T
-C
#stat, displays the status information for the file.
To create a file, you can use the file editor, Word is a word processor
ASCII: U.S. National Standard Information Interchange code, is plain text, without any information.
128 characters, how to store it, how to store it on a computer?
Binary:
0,1,10,11
2^6=0,63
2^7=0,127
000 0000-111 1111
Standard: Gb18030,gbk,gb2312,unicode (Globalization)
A text editor is an edit of plain ASCII text.
Text editor in Linux: Nano
Delete File: RM + file name
-I user alias, interactive.
\ alias Command + parameter, use the original command.
-F: Force Delete, silent, delete directly.
-R: Recursive Delete, directory
1. Create a Directory
(1). Create boot and sysroot under/mnt/
(2). Create grub under/mnt/boot;
(3). Create a proc,sys,bin,sbin,lib,usr,var,etc,dev,home,root,tmp under/mnt/sysroot
a). Create a bin,sbin,lib under/MNT/SYSROOT/USR
b). Create a modules under/mnt/sysroot/lib
c). Create a Run,log,lock under/mnt/sysroot/var
d). Create a INIT.D under/MNT/SYSROOT/ETC
Copy and move files:
Cp:copy
CP SRC DEST
CP file1 File2 File3 No, the last one for the target file, File1 and file2 for the source file
A file to a file
Multiple files to a directory
Cp-r recursive replication
-I: Interactive
-F: Forced replication
-P: Preserve the owner, group, permission, timestamp of the file during copying
-A: Preserves all properties of the original file. Archive replication, often used for backups.
-D: Copy link (keep link)
-L: Copy the file that the link points to
-P: Keep the link.
Cp/etc/{passwd,ininttab,rc.d/rc.sysinit}/tmp/curly brace expansion mechanism.
Mv:move
Moving files
MV SRC DEST
-F: Forced override
-I: Interactive
-T: Target source DEST SRC
Install: Installation (copy function is the same as CP)
You can create a file and create a directory
-D Directory Create directories
-m specifies permissions after replication, with all permissions by default.
Install-t DIRECTORY SRC ...
No recursive copy of the directory, copy the source file.
Execute the program
Device Management
Software Management
Network management
Linux systems and common operational commands