1, describe the composition of the computer and its functions.
Modern computer systems follow the von Neumann architecture, which consists of the following components:
Arithmetic: Used for binary arithmetic and logic operation;
Controller: Used to control the coordination of computer components, is a scheduling control center;
Memory: Used to store data, usually referred to as memory. Store the data that participates in the calculation including the result;
Input device: Used to enter data into a computer, such as a keyboard;
Output device: Displays the result or process of computer calculation, such as a display, printer;
Where the operator and controller are concentrated in the CPU, the input/output device is the device by which the computer interacts with the person.
2. List Linux distributions by series and describe the connection and difference between different distributions.
Mainstream distributions include Slackware, Debian and Redhat, all of which are part of the GNU program, featuring the following:
Slackware: The directory structure is rigorous; the version pursues stability rather than chasing new; The Package Manager compiles the installation with the TGZ/TXZ format file plus the installation script;
Debian: Maintained by non-commercial organizations, software packages are managed using dpkg and apt systems;
Redhat: Stable, version does not chase new, market share is big, package uses RPM and Yum management system;
3, describe the philosophy of Linux, and according to their own understanding of its interpretation of the description.
1), all documents, all objects in the computer system including hardware are treated as files;
2), composed of a small number of functions of a single, combined with a number of small programs to complete complex tasks;
3), the program runs as far as possible to avoid interaction with the user, in order to write a script to complete complex functions;
4), the use of plain text files to save the program configuration information, so that the program configuration more unified way.
4, description of the use of the command on the Linux system format, details Ifconfig, Echo, TTY, STARTX, export, pwd, history, shutdown, Poweroff, reboot, Hwclock, the use of the date command , and is elaborated in conjunction with the corresponding example.
Linux command format: command [OPTIONS ...] [ARGUMENTS ...]
Ifconfig
Description: A Linux Management class command that is typically used to display or edit (temporary) network interface (NIC) information.
Usage:
View NIC Information: # ifconfig [INTERFACE]
Example: # ifconfig eth0
To start or close the network card: # ifconfig <INTERFACE> {Up|down}
Example: # ifconfig eth0 down
Modify NIC configuration: # ifconfig <INTERFACE> [OPTIONS ...]
Example: # ifconfig eth0 192.168.1.62 netmask 255.255.255.0 MTU//modify NIC eth0 IP address is 192.168.1.62/24, and MTU is 2000
Temporarily add a virtual network card and configure it for ip:# ifconfig eth0:0 192.168.1.62 netmask 255.255.255.0//virtual network card eth0:0 IP is 192.168.1.62/24
Echo
Description: Displays variables or parameters from standard output.
Usage: echo [OPTIONS ...] [args ...]
Options:
-N: No line break after output
-e: Allow the use of the signifier character
/N: Line break
/t: Tab
Example: # echo $LANG//Display variable
# ECHO-E "Where is you from?\nchina." //output using the ideographic character
Tty:
Description: Displays the name of the terminal connected to the standard input
Usage: TTY [OPTION] ...
Options:
-S: does not output results, only returns a command execution status (available echo $? view)
StartX
Description: Start Xwindow
Usage: # STARTX
Export
Description: Display or set environment variables
Usage: Export [-FN] [name[=value] ...] or export-p
Options:
-P: List all environment variables
-F: Indicates that the variable name is a function name
-N: Delete environment variable
Cases:
Set an environment variable: # export myvar= ' HAHA '
Delete environment variable: # export-n MYVAR
View environment variables: # export-p
Pwd:
Description: Displays the directory where you are currently located
Usage: # pwd
History
Description: Show command history
Usage: History [OPTION] ... [FILENAME]
Options:
-A: Append the newly executed command history list to the history file in this session;
-D: Deletes the command specified in the history;
-C: Clears the command history;
Cases:
Show command history:
# History
Empty history command:
# history-c
Delete History command:
# history-d 3
Append the command executed after this login to the history file:
# history-a
Shutdown
Description: Shut down or restart the system
Usage: shutdown [OPTION] ... Time [MESSAGE]
Options:
-R: Rebooting the System
-H: Shut down the system
-C: Cancels the previous shutdown command
-K: Sends a warning message to all logged-in users without shutting down the system
Cases:
To shut down the system immediately:
# shutdown-h Now
Restart the system after 20 minutes:
# Shutdown-r +20
Send only one warning message, not really shut down:
# shutdown-k Now ' this system would reboot '
To cancel the shutdown schedule:
# shutdown-c
Poweroff
Description: Restart or shut down the system
Usage: poweroff [OPTION] ...
Options:
-F: Force, do not call shutdown
-P: Power off
Cases:
Normal shutdown:
# Poweroff
Force shutdown (data loss is possible):
# poweroff-f
Power off after system shutdown:
# poweroff-p
Reboot
Description: Restart the system
Usage: with Poweroff
Hwclock
Description: Query or set hardware clock
Usage: hwclock [functions] [options]
FUNCTIONS:
-r: Read hardware clock
--set: Setting the hardware clock
-S,--hctosys: Hardware clock sync to system clock
-W,--SYSTOHC: System clock synchronized to hardware clock
Cases:
To read the hardware clock of the current computer:
# Hwclock
Synchronize to the system clock, whichever is the hardware clock:
# Hwclock--hctosys
Set the date and time of the hardware clock:
# Hwclock--set--date= "2015/3/21 16:23:32"
Date
Description: Displays or sets the system clock
Usage: date [OPTION] ... [+format] or date [-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]
Format: Formatting symbols
%d
%F
%T
Date [MMDDHHMM[[CC]YY][.SS]]: Set
MM: Monthly
DD: what date
hh: Hours
mm: minutes
YY: two-digit year
CCYY: four-bit year
. SS: Seconds
Example:
Displays the current date and time:
# Date + "%F%T"
Modify the current date and time for 2015-02-12 23:32:22:
# Date 021223322015.22
5, how to get the Help information of the command on the Linux system, please detailed list, and describe how the chapters of the man document are divided.
1), whether the query command is an internal command or an external command, method: Type commend. If you use # Help commend for internal commands for further information, use # Man commend for external commands to view help information;
Example: # Type cd
CD is a shell builtin
# Help CD
# type LS
LS is aliased to ' LS--color=auto '
# Man LS
2), or use the Info command to view the command's help information, such as: # info Yum
3), external commands or applications are generally documented in post-installation or installation files, and can provide help information. such as: README, INSTALL, Changelog and so on.
Man Document Chapter Description:
Man1: User Commands
Man2: System call
MAN3:C Library Call
MAN4: Equipment files and special files
MAN5: Configuration file format
Man6: Games
MAN7: Miscellaneous
MAN8: Commands for managing classes
The manual page is compressed, and when you use the Man command, it is automatically extracted to a temporary directory and opened display; number 1-8 is the command section, the commands in different chapters correspond to different manual documents, such as the use of Whatis ls to see the ls command belongs to the 1th chapter, LS (1) corresponds to the/usr/share/ Man/man1/ls.1.gz
Note: Some keys exist in more than one section of the Help manual; To view the manuals in the specified chapters: Man # COMMAND
6, please list the Linux distribution version of the basic directory name of the law and function provisions
To ensure good bonding between Linux distributions, the LSB (Linux standards Base) provides a specification for a binary interface between the application and the running environment. One of the FHS (Filesystem Hierarchy Standard) standards defines the file system specification for Linux. Details are as follows:
/boot: Used to store Linux boot files, shifting kernel, and boot loader. can mount partitions independently;
/bin: A public basic command that can be run by the user, the OS will be used at startup, and cannot be associated to a separate partition;
/sbin: The basic command of the storage Management class, cannot associate the independent partition;
/lib: Basic shared library files, and kernel module files (/lib/modules);
/LIB64: As a supplement to/lib, it is dedicated to the storage location of auxiliary shared library files on x86_64 system;
/etc: Configuration file directory (plain text file);
Home directory for ordinary users, usually associated with a single partition;
/root:root user's home directory;
/media: Used to mount mobile portable devices, such as CDROM, USB, etc.;
/MNT: Temporary file system mount point;
/dev: The storage location of devices and special files, such as terminals, keyboards, hard drives, etc.;
/OPT: Installation location of third-party applications, gradually replaced by/usr/local;
/SRV: Data used by services running on the system;
/tmp: temporary file storage location;
/usr:universal GKFX, read-only data, the storage location of common public programs, such as external commands and installed programs. Typically mounted to a separate partition
/var:variable data files; used to store frequently changing information, such as logs, user messages, caches, and PID files. Typically mounted to a separate partition
/proc: The virtual file system is not actually stored on the hard disk. A mapping for memory that can be used to temporarily modify or view the kernel configuration;
/sys: A virtual file system for outputting information about hardware devices on the current system;
Components of an application on Linux:
Binaries:/bin,/sbin,/usr/bin,/usr/sbin,/usr/local/bin,/usr/local/sbin
Library files:/lib,/lib64,/usr/lib,/usr/lib64,/usr/local/lib,/usr/local/lib64
Configuration files:/etc,/etc/directory,/usr/local/etc
Help files:/usr/share/man,/usr/share/doc,/usr/local/share/man,/usr/local/share/doc
This article from "Silver Kay Blog" blog, declined reprint!
Linux Jobs 1