Introduction to Computer architecture and basics of Linux

Source: Internet
Author: User
Tags arithmetic echo command set time linux mint

Command-linux the basis of learning, and the foundation is the core.
???? There is no foundation but a castle in the ground, every time when dealing with problems, we need to ask outside the power, and lack of their ability to solve problems.
???? Learning more passive, knowledge of the reserve speed can not follow the use of demand.
???? ? So, the solid foundation has become the most serious. Want lofty high-rise floor, first lay a good foundation, in people still see when, sway sweat, and time will give you the growth of the return!
Introduction of computer structure and function

?????? Computer (computer), also known as a computer.

??? 1. Five major hardware:

?????????????? ? controller
?????????????? ? Arithmetic device
?????????????? ? memory
?????????????? ? input device
?????????????? ? output device

?????? ※ Note *:??? The input device (input) is the same as the output device, which is the I/O device

??? 2. Device function:

?????????????? ? Controller: The command system of the computer, obtains, analyzes the instruction to complete the complex task;
?????????????? An operator: the arithmetic and logic operations are completed, i.e. the data is processed;
?????????????? Memory: Volatile memory to store data for computing the running of the computer;
?????????????? Input device: Auxiliary Human to the instruction, text, data transmission to the computer equipment;
?????????????? ? output device: A device that shows the results of an operation to humans.

??? 3. Name of the device:

?????????????? ? Controller: CPU
?????????????? ? Operator: CPU
?????????????? ? Memory: Memory
?????????????? ? input Device: Keyboard
?????????????? ? output device: Display

?????? ※ Comment ※:?? For example, this is not a 1-to-1 relationship;

??? 4. Associated Memory:

?????????????? ? Controller: Comprehension, analytical power
?????????????? ? Arithmetic: Mental arithmetic ability
?????????????? Memory: Memory
?????????????? ? Input devices: eyes, ears
?????????????? ? output device: Mouth

?????? ※ Comment ※:?? The above explanations are described for convenience of memory.

Ii. a brief history and distribution of Linux

???? ? UNIX commercialization, source code is not available to academic research;
???? ? GNU program: Richard Storman launched the GNU Declaration at MIT, one of the reasons is "to reproduce the United spirit of cooperation in the software industry," the communist movement of the software industry;
???? ? GNU is the recursive abbreviation of "GNU is not Unix"; it has developed a large number of free software;
???? ? The GNU software is "used, copied, modified and distributed" for the guarantee of freedom;
???? ? GNU General Public License (GNU LICENSE,GPL Agreement): contains an agreement clause authorizing all rights to any person in the event that any restriction is prohibited from being added to any other person;
???? ? UNIX has been used on the OS, which makes GNU desperately need an OS to replace UNIX;
???? ? Minix-os: Mini-version of Unix, Andrew Stewart Tah can be Professor Baum after the commercialization of UNIX, for the teaching development of the OS;
???? ? The birth of Linux: Minix-os Linus Torvalds inspired, he began to design and develop an operating system kernel, then named: Linux.
???? Because the source code of the GPL is freely available, Linus Torvalds decided to replace his original agreement with the GPL, greatly accelerating the popularity of Linux.

????? Linux distributions

???? ? Here is a brief explanation of the narrow and broad sense of the OS: narrow Os:kernel (kernel); Generalized os:kernel+application (application);
???? ? Gnu/linux,linux is KERNEL,GNU to provide the app;
???? ? GNU provides a source format that needs to be compiled into a binary format (for computer recognition) before it can be installed on Linux;
???? The Business Company (community) compiles the source code into binary format (solving the vast majority of ordinary users without compiling ability) and publishes it in its own way; This is the release version;
???? ? Linux is now the three major distribution series: Debian, RedHat, S.U.S.E.
???? ? based on the DPKG series
?????? &? Commercial release version:
???????? ∈? Ubantu, Features: Beautiful desktop environment (Ubantu for two releases of Debian);
?????? & Community Release:
???????? ∈? Debian, Features: Install software, need to compile themselves, more difficult, suitable for high-level users;
???????? ∈?kubantu, features: Use of KDE desktop Ubantu;
???????? ∈? Linux Mint, Features: Ubantu Two-time release, compatible with;
???? ? Red Hat Series
?????? &? Commercial release version:
???????? ∈? Red Hat Enterprise Linux (RHEL) features: Popular in North America and China, updated every 3 years;
?????? & Community Release:
???????? ∈? CentOS, features: Two releases of Rhel, fully compatible with Rhel, currently acquired by Red Hat;
???????? ∈? Fedora, Features: Rhel's experimental plots, updated every 6 months;
???? ? Slackware Series
?????? &? Commercial release version:
???????? ∈? S.U.S.E, Features: Slackware Two-time release, popular in Europe;
???????? ∈? OpenSUSE, features: S.U.S.E's famous second release version;

Third, the philosophical thought of Linux

???? ①:? All documents, all documents, all documents (important things say three times); Linux abstracts almost all resources into file form: including hardware devices, communication interfaces, etc. (here, for example, device files are stored in the/dev directory)
???? ②:? Consists of a number of functions of a single program, a program to do only one thing and do it well; combine small programs to accomplish complex tasks (e.g., to pass the output of command 1 to command 2 as the input condition of a command in a pipeline)
???? ③: Try to avoid interacting with the user; Objective: Easy to automate tasks in a programmatic way, such as Shell scripting, setting up scheduled tasks, such as automatic patrol, automatic backup and other functions.
???? ④:? Use text files to save configuration information;

Four, Linux command detailed (late at any time to add):

???? ? Syntax common format for linux commands: command OPTIONS ARGUMENTS

???? ※ Note *:???? COMMAND:?? ? order?
???????????? OPTIONS:??? ? options?
????????????? ARGUMENTS:? ? parameters?

???? ? Command: To initiate an order: the kernel requests that a binary program be run as a process;
?????? &? programs--Process
?????? & Static---dynamic (Specific life cycle)
???? ? OPTIONS: There are 2 forms of expression:
?????? & short options:-C, Example:-l,-d, most can be combined:-l-d =-ld;
?????? & Long options:-?-Word, example:-?-Help

???? ※ Comment ※:?? The short options are not--and there are +, such as Date +%f
??????????? The long option cannot be merged;
??????????? ? Some options can take parameters, which are called option parameters, such as: Tail-n 20/etc/passwd, where 20 is the option parameter;

???? The command is detailed.

???? ? command name:??ifconfig
???? ? Syntax format:??ifconfig [Interface]
??????????? ?ifconfig interface [Aftype] options | Address ...
???? The command description:?? command is used to view and configure network interfaces, which can be configured appropriately when the network environment changes.
???? ? Common parameters:? ?up: Start the specified network device/NIC;
???????????? ?down: Turn off the specified network device/NIC;
???????????? ?arp: Sets whether the specified NIC supports ARP protocol;
???????????? ?-A: Display all interface information;
???????????? ?-s; display summary information;
???????????? ?add: Add the IPV6 address of the specified network card;
???????????? ?del: Delete the IPv6 address of the specified network card;
???????????? ?address: Set IPV4 address for network card;
???? ? One instance:?
???????????? ? [Email protected] ~]# ifconfig
???????????? ?ens33:flags=4163 < up,broadcast,running,multicast> MTU 1500
???????????? ?inet 10.10.10.152 netmask 255.255.255.0 broadcast 10.10.10.255
???????????? ?inet6 fe80::d 58f:eab4:c3c5:cfec prefixlen ScopeID 0x20< link>
???????????? ?ether 00:0c:29:d1:cc:c4 Txqueuelen (Ethernet)
???????????? ? RX Packets 706 Bytes 70318 (68.6 KiB)
???????????? ? RX errors 0 dropped 0 overruns 0 frame 0
???????????? ? TX Packets 482 Bytes 55976 (54.6 KiB)
???????????? ? TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

???????????? ?lo:flags=73 MTU 65536
???????????? ?inet 127.0.0.1 netmask 255.0.0.0
???????????? ?inet6:: 1 prefixlen ScopeID 0x10
???????????? ?loop Txqueuelen 1 (Local Loopback)
???????????? ? RX Packets Bytes 4212 (4.1 KiB)
???????????? ? RX errors 0 dropped 0 overruns 0 frame 0
???????????? ? TX Packets Bytes 4212 (4.1 KiB)
???????????? ? TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
???? ? analysis Notes:
???????????? ?ENS33: Nic Name
???????????? ?inet:ip Address
???????????? ?netmask: Subnet Mask
???????????? ?ether:mac Address
???????????? ?lo: Host loopback address
???????????? ? RX: Receiving packet condition
???????????? ? TX: Sending packet condition
???? ? Example two:?
???????????? ? Start Network card: Ifconfig ens33 up
???????????? ? Close nic: Ifconfig ens33 down
???? ? analysis Notes:
???????????? If you connect via SSH, the SSH channel will be disconnected, only through the remaining terminals, unless there are more than one network card;
???? ? Example three:?
???????????? ? Start the ARP protocol: ifconfig ens33 ARP
???????????? ? Turn off the ARP protocol: ifconfig Ens33-arp

???? ? command name:??echo
???? ? Syntax format:??echo[option] ... [STRING] ...
???? ? command description:?? echo command
???? ? Common parameters:??-n: Do not output newline characters at the end of a line.
??????????? ?-E: Allows you to interpret the characters listed below for the backslash escape.
??????????? ?-E: It is forbidden to interpret those sequences in the strings.
???????????? ?-?-Help: Show assistance and exit (must be run separately)
???????????? ?-?-version: Output release information and exit (must be run separately)
???? ? One instance:?
???????????? ? [Email protected] ~]# echo $PATH
???????????? ?/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
???? ? analysis Notes:
???????????? ? Displays the current environment variable, $PATH as the environment variable path
???? ? Example two:?
???????????? ? [[email protected] ~]# echo $?
???????????? ?0
???? ? analysis Notes:
???????????? ?echo $? Indicates that the result of the last execution of the command was displayed, 0 was correct, and 1-255 indicated an error;
???? ? Example three:?
???????????? ? [Email protected] ~]# echo ifconfig | grep inet | awk ' {print $} ' | head-1 hostname >>/etc/hosts
???????????? ? [Email protected] ~]# tail-1/etc/hosts
???????????? ?10.10.10.152 Magedu.study
???? ? analysis Notes:
???????????? In the counter-quotes in the above command, the command reference is executed by executing the command in the counter-quotes and then saving the command result to the hosts file after the echo command.

???? ? command name:??tty
???? ? Syntax format:??tty [OPTION] ...
???? Command description:?? Displays the file name of the terminal that connects the standard input
???? ? Common parameters:??-s,-silent,-quiet: Do not show anything, just return an exit status
???????????? ?-?-Help: Display assistance information
???????????? ?-?-version: Show release information
???? ? Example Demo:?
???????????? ? [[email protected] ~]# TTY
???????????? ?/dev/pts/1
???? ? analysis Notes:
???????????? ? Serial Terminal: TTYs
???????????? Pseudo Terminal: Pty

???? ? command name:??startx
???? ? Syntax format:??startx [[Client] Options ...] [[Server] [Display] options ...]
???? Description of the command:?? initializing an X session
???? ? analysis Notes:
???????????? The?STARTX command simplifies the process of starting an X session.

???? ? command name:??export
???? ? Syntax format:??exprot [-fnp][variable name]=[variable setting value]
???? Command description:?? To export the shell variable as an environment variable, or to output a shell function as an environment variable;
???? Common parameters:??-f: Represents the function name in [variable name];
??????????? ?-n: Deletes the specified variable. The variable is not actually deleted, but is not exported to the execution environment of the subsequent instruction;
???????????? ?-p: Lists all the environment variables that the shell assigns to the program.
???? ? Example Demo:?
???????????? ? [[email protected] ~]# export-n user= "root"
???????????? ? [Email protected] ~]# export
???????????? ?... Omitted in front
???????????? ?declare-x term= "Xterm"
???????????? ?declare-x xdg_runtime_dir= "/run/user/0"

???? ? command name:??pwd
???? ? Syntax format:??pwd [-LP]
???? Command description:?? Print the current working directory;
???? Common parameters:??-l: Prints the value of the $PWD variable, if it names the current working directory;
???????????? ?-p: Prints the current physical path without any symbolic links;
???? ? Example Demo:?
???????????? ?lrwxrwxrwx. 1 root root 11 February 18:02 init.d-RC.D/INIT.D
???????????? ? [[email protected] etc]# CD init.d/
???????????? ? [[email protected] init.d]# pwd
???????????? ?/ETC/INIT.D
???????????? ? [[email protected] init.d]# pwd-l
???????????? ?/ETC/INIT.D
???????????? ? [[email protected] init.d]# pwd-p
???????????? ?/ETC/RC.D/INIT.D
???????????? ? [[email protected] ~]# export

???? ? command name:??history
???? ? Syntax format:??history [-c] [-D offset] [n]
??????????? ?HISTORY-AWRN [FileName]
??????????? ?history-ps arg [arg ...]
???? Command description:?? Displays or manipulates the history list.
???? ? Common parameters:??-c: Empty command history;
??????????? ?-d Offset: Deletes the specified command history entry;
??????????? ?n: Displays the last n history;
??????????? ?-a: Appends the history in the current cache to the. bash_history file;
???????????? ?-n: Reads unread rows from the history file;
???????????? ?-r: Reads the history file and appends the contents to the History list;
???????????? ?-w: Reads the history file and appends the contents to the History list;

???? ? One instance:?
???????????? ? [[Email protected] init.d]# History 5
???????????? ?1048 Help
???????????? ?1049 history
???????????? ?1050 Echo $HISTCONTROL
???????????? ?1051 history-d 1048
???????????? ?1052 History 5
???????????? ? [Email protected] init.d]# history-d 1050
???????????? ? [Email protected] init.d]# History 4 | Head-1
???????????? ?1050 history-d 1048
???? ? analysis Notes:
???????????? ? The above demo removes 1048 commands, two queries, 1048 commands are different, and shows how to use the last 5 records.

???? ? command name:? ?history
???? ? Syntax format:? ?history [-c] [-D offset] [n]
???????????? ?HISTORY-AWRN [FileName]
???????????? ?history-ps arg [arg ...]
???? ? Command description:? ? Displays or manipulates the history list.
???? ? Common parameters:??

???? ? Example two:?
???????????? ? [Email protected] init.d]# history-c
???????????? ? [Email protected] init.d]# history
???????????? ?55 history
???????????? ? [Email protected] init.d]# History-r
???????????? ? [[Email protected] init.d]# History 3
???????????? ?1050 ifconfig
???????????? ?1051 TTY
???????????? ?1052 History 3

???? ? analysis Notes:
???????????? ? Use the-C option to empty the history list in the swap, and then use the-r option to synchronize the records in the history file to the History list.

???? ? Example three:?
???????????? ? [Email protected] ~]# Tail-2. bash_history
???????????? ?ifconfig
???????????? ?tty
???????????? ? [[Email protected] init.d]# History 3
???????????? ?1050 ifconfig
???????????? ?1051 TTY
???????????? ?1052 History 3
???????????? ? [[email protected] init.d]# ls
???????????? ?functions Netconsole Network README
???????????? ? [[email protected] init.d]# echo $?
???????????? ?0
???????????? ? [Email protected] init.d]# history-w
???? ? analysis Notes:
???????????? ? Use the-w command to add the history of the command in the cache to the history file;
???? ? Tips for use:
???????????? ?! #: Once again execute the # command in the History list
???????????? ?!! : Executes the previous command again (with Up ARROW key)
???????????? ?! String: Executes the most recent command in the command history list that starts with a string; (very useful)
???? ? Example four:?
???????????? ? [Email protected] init.d]#!l
???????????? ?ls
???????????? ?functions Netconsole
???????????? ?network README
???????????? ? [Email protected] init.d]#!1051
???????????? ?tty
???????????? ?/dev/pts/4
???????????? ? [[email protected] init.d]#!!
???????????? ?tty
???????????? ?/dev/pts/4
???? ? analysis Notes:
???????????? Note: The repetitive execution of commands is sometimes dependent on idempotent;

???? ? command name:??shutdown
???? ? Syntax format:??/sbin/shutdown [-t sec] [-ARKHNCFF] time [warning-message]
???? Command description:?? shutdown
???? ? Common parameters:??-k: Displays warning messages to everyone;
???????????? ?-r: Restart;
???????????? ?-h: Shut down the machine;
???????????? ?-F: Skip disk detection when restarting;
???????????? ?-F: Force disk detection when restarting;
???????????? ?-c: Cancels the running shutdown process and cannot specify the time parameter;
???????????? ?time: Shutdown time;
???? ? One instance:?
???????????? ? [Email protected] ~]# shutdown-h 5
???????????? ? Shutdown scheduled for two 2018-03-27 09:45:25 CST, use ' shutdown-c ' to cancel.
???????????? ? [Email protected] ~]#
???????????? ? Broadcast message from [email protected] (Tue 2018-03-27 09:40:25 CST):
???????????? ? The system is going down for Power-off at Tue 2018-03-27 09:45:25 cst!
???????????? ? [Email protected] ~]# shutdown-c
???????????? ? Broadcast message from [email protected] (Tue 2018-03-27 09:41:06 CST):
???????????? ? The system shutdown have been cancelled at Tue 2018-03-27 09:42:06 cst!
???? ? analysis Notes:
???????????? ?-c can be canceled during shutdown (restart) wait time;
???????????? ?now for immediate execution
???????????? ?HH:MM (several minutes to execute)
???????????? ?+m for M minutes after execution
???? ? One instance:?
???????????? ? [Email protected] ~]# Shutdown-k 5
???????????? ? Shutdown scheduled for two 2018-03-27 10:03:49 CST, use ' shutdown-c ' to cancel.
???????????? ? [Email protected] ~]#
???????????? ? Broadcast message from [email protected] (Tue 2018-03-27 09:58:49 CST):
???????????? ? The system is going down for Power-off at Tue 2018-03-27 10:03:49 cst!
???????????? ? Broadcast message from [email protected] (Tue 2018-03-27 09:59:49 CST):
???????????? ? The system is going down for Power-off at Tue 2018-03-27 10:03:49 cst!
???????????? ?... Omitted after
???? ? analysis Notes:
???????????? ?-K option will not be 1 minutes notice, if you need to cancel the use of CTRL + C;

???? ? command name:? ?poweroff
???? ? Syntax format:? ?poweroff [OPTIONS ...]
???? ? Command description:? Shutdown, and cut off the power, only the administrator can use;
???? ? Common parameters:? ?-n: Do not perform sync operation when shutting down the operating system;
???????????? ?-w: Do not really shut down the operating system, only in the log file "/var/log/wtmp";
???????????? ?-d: When the operating system is shut down, the operation is not written to the log file "/var/log/wtmp" to add the corresponding record;
???????????? ?-f: Forced shutdown of the operating system;
???????????? ?-i: Shut down all network interfaces before shutting down the operating system;
???????????? ?-H: Set all hardware in the system to standby mode before shutting down the operating system.

???? ? command name:? ?halt
???? ? Syntax format:? ?halt [OPTIONS ...]
???? ? Command description:? ? shutdown, only the administrator can use;
???? ? Common parameters:?
???????????? ?-p: When the power off, the way to do the shutdown (Poweroff) action;
???? ? analysis Notes:
???????????? The?-n,-W,-D,-F,-I options are the same as the Poweroff command;

???? ? command name:??reboot
???? ? Syntax format:??reboot [OPTIONS ...]
???? Command description:?? Restart, only the administrator can use;
??????????? The?-n,-W,-D,-F,-I options are the same as the Poweroff command;

???? ? command name:??date
???? ? Syntax format:??date [OPTION] ... [+format]
???? Command description:?? query system time;
???? ? Common parameters:?
???????????? ?%a: Abbreviated weekday of the current region (Sun. Sat)
???????????? ?%a: The full name of the day of the current region (different lengths) (Sunday). Saturday)
???????????? ?%b: The full name (variable length) of the month of the current region (January). December)
???????????? ?%c: Date and time of the current region (Sat 12:02:33 EST 1989)
???????????? ?%d: (The number of months) (in two digits) (01..31)
???????????? ?%d : Date (displayed in month/date/year format) (MM/DD/YY)
???????????? ?%f: Date (displayed in year-month-date format) (YYYY-DD-MM)
???????????? ?%h: Shorthand for the month of the current region (Jan. DEC)
???????????? ?%h: Hours (in 24-hour display, two-digit representation) (00..23)
???????????? ?%i : Hours (12-hour display, two-digit representation) (01..12)
???????????? ?%j: The day of the year (expressed in three digits) (001..366)
???????????? ?%m: Month (denoted by two digits) (01..12)
???????????? ?%m: Number of minutes (denoted by two digits) (00..59)
???????????? ?%n: Line break
???????????? ?%p: Is the current time morning or PM
???????????? ?%r: Time, according to the 12-hour display (Hh:mm:ss [a/p]m)
???????????? ?%s: From January 1, 1970 0:0 0 seconds to now the number of seconds (GNU extension)
???????????? ?%s: Number of seconds (denoted by two digits) (00..60)
???????????? ?%t: Time, by 24-hour display (HH:MM:SS)
???????????? ?%u: The first few weeks of the year, with Sunday as the beginning of the week (expressed in two digits) (00..53)
???????????? ?%v: The first few weeks of the year, with Monday as the beginning of the week (expressed in two digits) (01..52)
???????????? ?%w: The number of days of the Week (0..6); 0 on behalf of Sunday
???????????? ?%x: Displays the current date in (MM/DD/YY) format
???????????? ?%x: Displays the current time in (%h:%m:%s) format
???????????? ?%y: The latter two digits of the year (00..99)
???????????? ?%y: Year (expressed in 4 digits) (1970 ...)
???? ? One instance:?
???????????? ?linux-fa67:~ #
???????????? ?date + "%F%x%a"
???????????? ?2018-03-27 11:59:55 Tue
???? ? analysis Notes:
???????????? Invoking multiple parameters in the?date command requires all parameters to be referenced with "" or ";

???? ? Syntax format:??date [-u|-utc|-universal] [MMDDHHMM[[CC]YY][.SS]
???? Command description:?? set the system time;
???? ? Common parameters:??-d,-date=string: Displays the time specified by STRING, not the current time;
???????????? ?-r,-reference=file: Displays the last modified time of FILE;
???????????? ?-s,-set=string: Set time according to STRING
???????????? ?-u,-utc,-universal: Show or set global Time (GMT)
???? ? Example two:?
???????????? ? [[Email protected] ~]# date 040512152017.16
???????????? ?2017 April 05 Wednesday 12:15:16 CST
???? ? Example three:?
???????????? ? [Email protected] ~]# date-s 2018-03-27
???????????? ?2018 March 27 Tuesday 00:00:00 CST
???????????? ? [Email protected] home]# date-s 12:27:00
???????????? ?2018 March 27 Tuesday 12:27:00 CST
???? ? analysis Notes:
???????????? ? Both of the above examples are two ways to set the time, but the first one does not need to add the parameter-s, the latter must be added with the-s parameter;
???? ? Example four:?
???????????? ? [Email protected] home]# Date-u
???????????? ?2018 Monday, March 26 16:06:28 UTC
???? ? Example five:?
???????????? ? [Email protected] home]# Date-r hosts
???????????? ?2018 March 06 Tuesday 18:55:44 CST
???????????? ? [[Email protected] home]# Stat hosts | grep recently
???????????? ? Last visit: 2018-03-27 12:34:43.691979286 +0800
???????????? ? Last modified: 2018-03-06 18:55:44.073971393 +0800
???????????? ? Last modified: 2018-03-27 12:34:43.691979286 +0800
???? ? analysis Notes:
???????????? The date-r is consistent with the mtime time of the stat command.

???? ? command name:??hwclock
???? ? Syntax format:??hwclock [function] [option ...]
???? Command description:?? query and set hardware time;
???? ? Common parameters:?
???????????? ?-s?-?-Hctosys: Hardware as the standard, the system time to adjust to the same hardware time;
???????????? ?-w?-?-SYSTOHC: Based on the system, the hardware time is adjusted to be the same as the system time;
???? ? Example Demo:?
???????????? ?linux-fa67:~ # Date
???????????? ? Tue Mar 12:44:27 EDT 2018
???????????? ?linux-fa67:~ # Hwclock
???????????? ? Tue Mar 09:21:58 2018-0.969610 seconds
???????????? ?linux-fa67:~ # hwclock?-w?-?-SYSTOHC
???????????? ?linux-fa67:~ # Hwclock
???????????? ? Tue Mar 12:45:10 2018-0.454103 seconds
???? ? analysis Notes:
???????????? ?-s is similar to the-W use method, do not do demo;
???? ? command name:? ?clock
???? ? Command description:? ?clock a symbolic link to the Hwclock command
???????????? ? [Email protected] sbin]# Ls-lih hw*
???????????? ?34282438-rwxr-xr-x. 1 root root 49K August 4 hwclock
???????????? ? [Email protected] sbin]# LS-ILH CL
???????????? ?34282427 lrwxrwxrwx. 1 root root 7 February 18:04 clock-hwclock
???? ? analysis Notes:
???????????? The symbolic link is different from the Inode value of the file itself, and some Linux do not have clock commands, such as S.U.S.E;

V. Ways to get help

????? Linux commands are divided into built-in commands and external commands:

???? Built-in command: Shell's own commands
???? External command: Not included in the shell and will not be transferred into memory when needed
???? ? Command type: Used to query whether a command is built-in or an external command
???? ? usage: Type COMMAND
???? How to get help with built-in commands:
???? How to get help from external commands:
?????? ? Command–help (command comes with a brief help)
?????? ?man COMMAND (Manual manual: Position/usr/share/man)
?????? ?man Chapter Division:
??????????????? ①: Instructions or executables that the consumer can manipulate in the shell
??????????????? ②: System call
??????????????? ③: Some common functions and function libraries (library), most of which are C's function libraries (LIBC)
??????????????? ④: Description of the device file, usually in/dev file
??????????????? ⑤: The format of a profile or a file
??????????????? ⑥: Game Use Help
??????????????? ⑦: Miscellaneous
??????????????? ⑧: Management instructions available to system administrators
??????????????? ⑨: Documents related to Kernel
?????? ? Synopsis:
??????????????? ①:[?]: Optional content;
??????????????? ②:<?>: Content that must be provided;
??????????????? ③:a|b|c: choose one more;
??????????????? ④: ...?: Similar content can appear more than one;

???? ※ Note *:????? ?name: Description of functionality
??????????????? ? Synopsis: Syntax format
??????????????? ? DESCRIPTION: Description
??????????????? ? Options: Option
??????????????? ? EXAMPLES: Using the example
??????????????? ? AUTHOR: Author
??????????????? ? BUGS: How to Report program bugs
??????????????? ? See ALSO: Reference
??????????????? ?...

Vi. Basic directory names and functions of Linux distributions

???? ? directory name function
???? ?/bin Basic Command Program files available to all users;
???? ?/sbin common system Management using the tool program;
???? ?/boot boot loader must use the static files: Kernel,initramfs (INITRD), grub, etc.;
???? ?/dev storage device files or special files;
???? ?/ETC System Program configuration file, only for static;
???? ?/home home directory for ordinary users;
?????? (/home/username)
???? ?/root Administrator home Directory;
???? ?/lib library file;
???? ?/LIB64 64-bit system-specific shared libraries;
???? ?/media Portable device mount point;
???? ?/mnt other file system temporary mount points;
???? ?/opt the installation location of the attached application;
???? ?/srv the data provided by the current host for the service;
???? ?/tmp Temporary files directory;
???? ?/USR read-only data path for global sharing;
???? ?/usr/local Install local applications or third-party programs;
???? ?/var a directory that stores data that is often changed;
???? ?/proc memory-based pseudo-file system for storing kernel and process storage related information;
???? The?/sys Management Linux device provides a unified mode interface;

Computer composition introduction and Linux Basics

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.