1, describe the composition of the computer and its functions.
Answer: Arithmetic, memory, controller, input device, output device
Operators: arithmetic operations, logical operations
Memory: Stores data. such as HDD, u disk, etc.
Controller: Remove the instruction from the memory, control the computer parts coordinated operation
Input devices: Devices that use external information from the computer, such as a keyboard, mouse
Output device: A device that processes information from a computer in a form that can be identified by a person. such as displays.
2. List Linux distributions by series and describe the connection and difference between different distributions.
For:
First, Ubuntu
Second, Fedora: Linux products for desktop end after Redhat 9
Third, OpenSUSE
Iv. Debian
The re-edited version of Centos:redhat. Unlike the Redhat, paid technical services are not available. Maintained by individual community technology enthusiasts
Vi. Redhat: High occupancy rate on the market. There are specialized companies to provide paid technical services.
Vii. FreeBSD
3, describe the philosophy of Linux, and according to their own understanding of its interpretation of the description.
For:
1, all the equipment is a file
2, all the configuration files are text documents, can be easily managed and configured
3, can be very good through the automated script for daily operation
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.
Answer: Linux command format: command [OPTIONS ...] [ARGUMENTS ...]
Ifconfig
Description: Used to display or change network interface information
Usage:
To view network interface information: #ifconfig
Shut down the network interface: #ifconfig eth0 down
Modify network Interface configuration: #ifconfig <INTERFACE> [OPTIONS ...]
such as: # ifconfig eth0 192.168.0.88 netmask 255.255.255.0
Echo
Description: By setting standard output parameters or variables
Usage: echo [OPTIONS ...] [args ...]
Options:
-e: Allow the use of the signifier character
\ n: Line break
\ t: Tab
such as: #echo $LANG display variables
#echo-E "Hello,world\nallan" Display characters
Hello,world
Allan
Tty:
Description: Displays the terminal name of the connection
Usage: TTY [OPTION] ...
Option:-S: does not output results, only returns one command execution state
StartX
Description: Start Xwindow
Usage: #starx
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
If you view environment variables: #export-P
Pwd:
Description: Displays the directory where you are currently located
Usage: #pwd
History
Description: Show History command
Usage: History [OPTION] ... [FILENAME]
Options:
-C Empty History command
-D Delete the specified history command
Example: #history Show History command
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
Example: #shutdown-H now-shut down the system immediately
Poweroff
Description: Turn off system and power off the system
Usage: Usage: poweroff [OPTION] ...
Options:
-F: Force shutdown, do not call shutdown
such as: #poweroff
Reboot
Description: Restart the system
Usage: reboot [OPTION] ...
Options:
-F: Force shutdown, do not call shutdown
such as: Reboot
Hwlock:
Description: Query or set hardware clock
Usage: hwclock [functions] [options]
Options:
-R: Read the existing hardware clock
-set: Setting the hardware clock
-s,-hctosys: Hardware clock sync to system clock
-W,-SYSTOHC: System clock sync to hardware clock
such as: #hwclock
Data
Description: Displays or sets the system clock
Usage: date [OPTION] ... [+format] or date [-u|–utc|–universal] [MMDDHHMM[[CC]YY][.SS]]
Such as:
#date
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.
Answer: There are several ways: Help command, man command, Info command, command--help
The chapters of man are categorized as follows:
1 General Commands
2 system calls, such as Open,write
3 library functions, such as Printf,fread
4 special files, i.e. various device files under/dev
5 refers to the format of the file, such as passwd, will explain the meaning of the various fields in this file
6 left for the game, defined by each game
7 attachments There are also variables, such as the global variable to Environ, which is described here.
8 Commands for system administration, these commands can only be used by root, such as Ifconfig
6, please list the Linux distribution version of the basic directory name of the law and function provisions
/: root directory, directory only, general root directory, do not store files,/etc,/bin,/dev,/lib,/sbin should and root directory placed in a partition
/bin:/usr/bin: A directory that executes binary files, such as common commands ls, tar, MV, Cat, and so on.
/boot: Place some files that are used by the Linux system when it is started. /boot/vmlinuz is the kernel file for Linux, as well as/boot/gurb. Recommended separate partition, partition size 100M
/dev: Store the device files under the Linux system and access a file in that directory, equivalent to accessing a device, which is commonly used to mount the optical drive mount/dev/cdrom/mnt.
/etc: the directory where the system configuration file is stored, the executable file is not recommended in this directory, the important configuration files are/etc/inittab,/etc/fstab,/ETC/INIT.D,/etc/x11,/etc/sysconfig,/etc/ Xinetd.d remember to back up before modifying the configuration file. Note:/etc/x11 stores settings related to x Windows.
/home: The Default User House directory, when adding user accounts, the user's home directory is stored in this directory, ~ represents the current user's home directory, ~test represents the user test home directory. It is recommended to separate partitions and set up a large disk space for user-friendly data storage
/lib:/usr/lib:/usr/local/lib: The system uses the library's directory, the program in the execution process, need to call some additional parameters when the function library assistance, the more important directory is/lib/modules.
/lost+fount: When a system exception is generated, some missing fragments are placed in this directory, which usually appears automatically in the Appliance directory. If the hard drive is loaded in/disk, the directory will be automatically generated in this directory/disk/lost+found
/mnt:/media: cd default mount point, usually the disc is mounted under/mnt/cdrom, or not necessarily, you can choose any location to mount.
/OPT: A directory for the host to install additional software. For example: The Fedora Community development software used by FC4, if you want to install new KDE desktop software yourself, you can install the software in this directory. In the previous Linux system, it is customary to place it in the/usr/local directory
/proc: This directory data are in memory, such as system core, external device, network status, because the data are stored in memory, so do not occupy disk space, the more important directory has/proc/cpuinfo,/proc/interrupts,/PROC/DMA,/proc /ioports,/proc/net/*, etc.
/root: System administrator Root home directory, the system first boot partition is/, so it is best to put/root and//placed under a partition.
/sbin:/usr/sbin:/usr/local/sbin: Place executable commands that the system administrator uses, such as Fdisk, Shutdown, Mount, and so on. Unlike/bin, these directories are commands for the root of the system administrator, and the average user can only "view" and not be set up and used.
/tmp: The directory where the files are temporarily stored by the general user or the program being executed, accessible to anyone, important data cannot be placed in this directory
/SRV: The data directory that needs to be accessed after the service starts, such as the Web page data that the WWW service needs to store within/SRV/WWW
/usr: The application holds the directory,/usr/bin stores the application,/usr/share stores the shared data,/usr/lib storage cannot run directly, but is necessary for many programs to run some library files. /usr/local: Store the software upgrade package. /usr/share/doc: System description file storage directory. /usr/share/man: Program Description file directory, the use of man LS will query/usr/share/man/man1/ls.1.gz content recommended separate partition, set a large disk space
/var: Place files that change frequently during the execution of the system, such as log files that change at any time/var/log,/var/log/message: All login Files directory,/var/spool/mail: Mail storage directory,/var/run: Program or service startup
, its pid is stored in the directory. It is recommended to separate partitions to set large disk space
First week homework