Linux First Class Homework

Source: Internet
Author: User
Tags log log system log time and seconds

    1. Describe the composition and functional description of a computer

      Composition

      The computer can be divided into five major units, including controller, arithmetic, main memory, input unit and output unit.

      Where the controller and the operator are usually our CPU, the main memory is our memory. The input unit includes mouse, keyboard and so on, while the output Unit has screen, printer and so on.

      Function:

      The controller is responsible for the collaborative work of the various components of the computer, which is responsible for logical operations and mathematical operations.

The primary memory is responsible for the storage of the operational data, and all CPU-called data is in the main memory.

The input unit is responsible for importing the data that needs to be processed from the external input to the main storage, and the output unit returns the data processed by the CPU back to the user.


2. List Linux distributions by series and describe the links and differences between different versions

The major Linu distributions include Suse,debian,ubuntu,redha,centos,archlnux,gentoo,lfs and so on.

Contact:

All distribution are developed on the basis of Kenel, and the application software used is highly repeatable.

difference:

The distribution is divided into two major systems according to the software Package installation tool.

A system that uses RPM to install software, including Red Hat, Fedora, Suse.centos, etc.

One is a system that uses dpkg to install software, including Debian, Ubuntu, b2d, etc.

The release version is divided into commercial and free versions, depending on the application area . The commercial version is maintained by the enterprise and the user uses the release version for free, but the service needs to be purchased from the enterprise. Free version is maintained by the community and is completely free.


3. Describe the philosophical thinking of Linux and interpret it as it is understood

1) all documents; All resources include hardware devices, software programs, and data can be abstracted into files.

2) consists of a number of small programs of a single purpose; In Linux systems, many small programs work together to accomplish complex tasks.

3) Text file save configuration information; All system configurations are recorded in a text file. The user can configure the system with text editing tools.

4) Avoid capturing user interfaces as much as possible, and automate the implementation of complex functions to achieve efficient management.


4. Common command use Format

1) ifconfig

Description: Configure the network interface (will be retired, IP addr IP link replaced)

Format: ifconfig [interface]

Example: Ifconfig eth0

2) Echo

Description: Output a line of text

Format: Echo [OPTION] [STRING]

Parameter:-N output text with no line break

-E allows the use of backslashes to turn the signifier character

\ t output tab \ n NewLine \b Back

Example: Echo-e "I am studying linux.\nmy name is Wuzhenliang."

Screen display: I am studying Linux.

My name is Wuzhenliang.

3) TTY

Description: Print the file name corresponding to the terminal that is connected to the basic input

Format: TTY [OPTION]

Option:-S does not output any information to the screen, only returns the exit code

Example: TTY

4) StartX

Description: Start the Linux visualization mode

5) Export

Description: Assigning a value to a shell variable

Example: Export histcontrol= ' ignorespace '

6) PWD

Description: Displays the absolute path currently in place

Format: pwd

7) History

Description: Lists or processes the list of used commands

Format: History [OPTION]

Option:-C Clears the history list-D number clears the specified history command

Example: history-d #清除第200条命令

8) shutdown

Description: Notifies the system to shut down

Format: Shutdown [OPTION] time [MESSAGE]

Option:-R Restart System

-h hangs or shuts down

-C Cancel shutdown or restart

Time Format:

1.now

2.+n shutdown or restart after n minutes

3.hh:mm specific to a certain point in time to shut down or restart

Example: Shutdown-r now #通知系统马上重启

Shutdown-h 20:30 #通知系统在晚上的8点30分关机

9) Poweroff

Description: Notifies the system to cut off power

Format: Poweroff [OPTION]

Option:-P power off

Example: Poweroff-p

) reboot

Description: Notification System restart

Parameter:-F #通知系统强制关机 (not recommended!) )

One) Hwclock

Description: Query settings Hardware clock

Format: hwclock [functions]

Function:-S sets the system time to hardware clock

-W Sets the hardware clock to system time

Example: Hwclock-s

Hwclock #显示硬件时钟, with Hwclock-r

) Date

Description: Query Set system time

Format: Date [OPTION] ... [+format]

Date [MMDDHHMM[[CC]YY][.SS]]

Option:-S sets the system time with a string

Time format: +%f display current Month day #系统时间显示为2016-08-04

+%T Displays the current time and seconds #系统时间显示为20:30:30

Example: Date-s 2016-06-06 #更改系统时间为2016年6月6号

Date 033108002012.50 #更改系统时间为2012年3月31号8点00整50秒


5. How to get command Help information in Linux, describe the division of the man document chapter in detail

The commands for Linux are divided into internal commands and external commands, which can be viewed by type

Help document Query method for internal commands: Assist command

Query method for the Help document for external commands: 1.man command

2.COMMAND--help

3.info COMMAND #作为前两种方法的补充

The individual components of the man document

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 Management classes

Division of the man document chapter

NAME Simple Description

Synopsis Summary

DESCRIPTION Detailed description

Option format options

Option options

PATTERNS and actions mode and action

AUTHOR author

REPORTING BUGS How to report a bug

Copyright

See ALSO other places to check


6. Listing the basic directory naming rules and function rules for Linux distributions

Important Directory Hierarchy

/bin General Command for storing binary, system startup

/sbin commands for administrators to use

Boot file for boot/boot system

/usr Common shared read-only files

/bin Common files for storing binary binaries

/sbin commands for administrators to use

/include headfile for storing C programs

/share Storing structured data (Man,doc)

/local installation directory for third-party applications

/OPT installation directory for early third-party applications

Files used by the/SRV system service

/dev device files

/etc system various configuration files

/rc.local boot -up content

/issue System Information before users log in

/MOTD message after user login

version information for the/redhat-release system

/PASSWD user account information

/shadow account password information

/group User group account information

/gshadow User group password information

/sudoers User Rights configuration information,VI This file is equivalent to Visudo

/rsyslog System Log settings file 6.5 version,5 for syslog

Home directory of a normal user, which is in this directory after landing

/lib Library file

/lib64 Library file

/lost+found system Unexpected key after some files that are used to initiate recovery

/media mount points for portable devices, including CDs, USB drives, etc.

/MNT Temporary mount directory with access to content after mount/dev/cdrom/mnt

/var stores the changeable file directory, including the log /var/log/messages

/cache cache data for the system

/LIB Application state information

/local variable data for third-party applications

/OPT provides variable data storage for OPT programs

PID file for/run process

Cache pool data for/spool systems

/cron/root data for timed tasks

/clientmqueue SendMail the temporary file directory, which often produces a large number of files

Temporary files generated during the/TMP system restart

/log log files

/log/secure record Log in system access information files

/proc Virtual File system

/cpuinfo Viewing CPU information

/meninfo viewing memory information

/interrupts viewing interrupt information

/sys virtual file system for outputting current system hardware Information



Linux First Class Homework

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.