Linux after class homework

Source: Internet
Author: User
Tags arithmetic what date linux mint

1, describe the composition of the computer and its functions.

The computer hardware has the arithmetic device, the controller, the memory, the input and the output equipment five parts compose;

Arithmetic: The main function is the operation of the data, in addition to the basic plus, minus, multiply, in addition to accidents, as well as logical judgment and processing, data comparison and other operations.

Controller: It is the control center of computer system, which commands the coordination of all parts of computers, and completes according to the stipulated goals and steps.

Memory: Internal memory and external memory

Internal memory: Used to store the computer's current operation of the program, data, etc., divided into random access memory RAM and read-only memory rom two kinds

External memory: Used to store a large number of temporarily non-participating in the operation or processing of data and programs, such as hard disk, CD-ROM, USB flash drive, USB mobile hard disk

Input device: The device that enters raw data and programs into the computer is called input device, input device input information such as: number, graphics, text in binary encoding input to the computer. Common input devices are: keyboards, scanners, mouse, video cameras, etc.

Output device: The computer's various types of data output is called the output device, the computer processing processing data into other devices can receive information such as: text, graphics, sound, video, etc., common output devices are: printers, monitors, plotters and so on.


2. List Linux distributions by series and describe the connection and difference between different distributions.

Linux Discovery version: Debian

Ubuntu

Linux Mint

Fedora

RHEL

Centos

Oracle Linux

Suse

Sles

OpenSUSE

Other distributions

The above operating systems are based on the Linux kernel two development of the operating system, the difference between the system is not too large, the company or the community in the development of the system is not the same direction, although adhering to the GPL open source agreement, but in two development of enterprise-oriented services or source of open source is not the same, Some of them require fees and are not completely free, so you can choose the appropriate version depending on your specific needs.


3, describe the philosophy of Linux, and according to their own understanding of its interpretation of the description.

The philosophy of Linux is:

1 All documents: Almost all the resources, including hardware equipment are organized into file format;

2 There are a number of single-purpose small programs composed of: a program to achieve only one function, and to do well, the combination of small programs to complete complex tasks;

3 try to avoid interacting with users: Objective: To implement script programming to automate certain functions;

4 use plain Text to save configuration information, verify that everything is file.


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 system command format: Commands "Options" "Parameters"

Options: Enable or disable one or more features

Short options:-C one character:-l-h (short option can be combined:-LH)

Long option:--word a word--long (long option not merged)

Parameters: The object of the command, providing data to the command

Ifconfig: View or configure current network card device information

1 direct use, can view IP address, gateway, mask, network card status, receive and send packets and other information

2 Turn off the specified NIC:ifconfig eth0 up ifconfig eth0 down

3 Configuration IP:ifconfig eth0 192.168.1.1

echo; display text or output variables

1 echo "Test"

2 echo $PATH

3 echo "test!" >a.txt

TTY: Display terminal

Physical Terminal: Direct access to native display and keyboard device files:/dev/console

Virtual Terminal: A software-based terminal that is attached to a physical terminal, and the CentOS default boot 6

Ctrl+alt+f (0-6)

Graphics Terminal: A software-based terminal that is attached to a physical terminal, but provides additional desktop environments

Device path:/dev/ttyn

Analog Terminal: a command line interface or SSH protocol or Telnet protocol to open a remote interface under a graphical interface

Device file:/dec/pts/#

STARTX: Start the X Window service, in fact, the STARTX command starts Xinit, and then xinit to start the X window

StartX [-D display:0] [-T |-W] [-X Startup | [-R Resources] [-M Window_manager]] [-wait]

-D display:0 Specifies the display name of the X server that is passed to the X client during startup.
-M Window_manager launches the window manager when the startup script is not found.
-R Resources when the startup script is not found, load the resource file.
-T initiates an X client for an X terminal.
-W starts the X server and x client for the X window session on the workstation.
-wait prevents the X session from restarting when the XDm command calls STARTX.

-X startup uses the startup script to start the X. window session.

Export: setting or displaying environment variables

Export $PATH = "path" (or "path= $PATH: Path")

Path= $PATH: Path 1: Path 2: ...: path n

test= ' test123 ' export test;

PWD: Show current directory

Related environment variables: PWD: Saved current directory oldpwd: Last directory path

History: Show historical instruction record content

When you log in to the shell, the command that is logged in the command history file is read: ~/.bath_history

Commands executed after logging into the shell are only recorded in the cache, and these commands are "appended" to the command history file in the user exit:

-A: Append the newly executed command history list to the history file in this session;

-D: Delete the specified command in the history file and delete it with the historical number;

-C: Clears the command history;

History-r/path/to/file, read the command in as the current bash history

History-w/path/to/file, writes the history of the current bash to the file

Quick action:

! Add Number: Call history in the numbering command;! 50

! +string: Call the most recent command in history that starts with a string (from backward forward)

!! : Previous command

History N shows the most recent N records

History | More list all history by screen

Shutdown: Safely shuts down the system

-t Tell init how long it will shut down before changing to another runlevel.

                   -r restart calculator.

                 -K does not really shut down, just sends a warning signal to each login (login).
                 -H shutdown power (halt).
                 -n no init, but to shut down. The use of this option is discouraged and the consequences of this option are often not always what you expect it to be.
                 -C Cancel current process cancels the currently executing shutdown program. So this option certainly does not have a time parameter, but you can enter                     A message to interpret, and this information will be sent to each user.
                 -F ignore fsck when restarting Calculator (reboot).
               -F Force fsck to restart the calculator (reboot).
             -time set the time before shutdown (shutdown).


Shutdown-h now-----immediately shut down the machine;
Shutdown-h 00:30----00:30 split off machine
Shutdown-h +10-----10 minutes after shutting down the machine
Shutdown-r now--restart immediately
Shutdown-r +10 ' The system would reboot '----10 minutes later and send notifications to each logged-on user
Shutdown-k now ' the system would reboot '---notifications are not really shut down for each logged-on user

Poweroff: give ACPI a command, and then shut down

reboot: used to restart the Linux system

Reboot [-n] [-W] [-d] [-f] [-I.]

- N: save data and restart the system

- W: test only, do not really reboot the system, will only write the data to the/var/log directory wtmp log files

- D: do not write data to the log file when restarting/var/tmp/wtmp

-F: Force reboot, do not invoke the function of shutdown instruction

-I: shut down network settings and restart the system

- H: put all the hard drives in standby mode before the system shuts down or Poweroff

There are two clocks in the Hwclock:linux machine: the hardware clock and the system clock, you can modify the system hardware clock through the BIOS, or if you do not want to restart the machine, then use the Hwclock command.

-S: Hardware synchronization system time

-W: System synchronization hardware Time

Date: Set and display the system time

Show weeks: ate +%a or%a

Display year: Date +%d or%f

Display time: Date +%t

Month: Date +%h

What time: Date +%h M: minutes S: seconds

The date +%h-%m-%s combination uses

Set up

Date Mmddhhmm

MM: Month

DD: what date

HH: Hours

MM: Minutes

YY: two-digit year

CCYY: four-bit year

. SS: Seconds

5, how to display the Help information on the Linux system to get the command, please detailed list, and describe how the chapter of the man document is divided.

Linux command Help

Internal command:

Help COMMAND

External command:

1COMMAND--help command-h

2 User's Manual: Man Conmmand

3 Information page: info COMMAND

4 program comes with help documentation: README INSTALL ChangeLog

5 Official documents: Official Site---Documentation

6 official documentation of the discovery version

7 Google or Baidu

Man help command:

The Linux Man Handbook has several chapters:

/usr/share/man/Help Collection path

Man1: User Commands

Man2: System call: Man 2 read (some key more than one chapter exists in the manual)

MAN3:C Library Call

MAN4: Equipment files and special files

Man6: Games

MAN7: Miscellaneous

MAN8: Commands for managing classes

Man command config file:/etc/man.confg manpath= Path

Man-m path Command: Searches the commands page at the specified location and displays


This article comes from the "Recharge yourself" blog, so be sure to keep this source http://zengzeyang.blog.51cto.com/6129531/1836692

Linux after 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.