Linux first time job

Source: Internet
Author: User
Tags arithmetic

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

The computer is composed of five parts: controller, arithmetic device, memory, input device and output device.

1) Controller: The controller is the control center of the whole computer system, which directs all the parts of computers to work in a coordinated manner to ensure that the computer is operated and handled methodically in accordance with the predetermined goals and procedures.

2) Operator: The main function of the operator is to perform various operations on the data. Besides the basic arithmetic operations of addition, subtraction, multiplication and addition, these operations include the logical processing ability of "logical judgment", which is the basic logic operation of "and", "or", "non", and the comparison and shift of data. Usually the controller and the operator are called the central Processing Unit (processing UNIT-CPU)

3) Memory: Memory is divided into read-only memory (ROM) and Random read-write memory (RAM). Read-only memory can only read data, can not write data (such as memory), random read and write memory can read and write data (such as, disk, USB stick).

4) input device: A device used to enter various raw data and programs into a computer called an input device

5) output device: A device that outputs various types of data from a computer called an output device


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

1) Slackware:

The oldest Linux distribution, mainly used for desktops, workstations, servers, the default desktop is ked

2) SUSE Linux:

A Linux based on the Slackware two development, mainly used for commercial desktops, servers. Popular in Europe, halfway through the acquisition of more slowly found.

3) OPENSUSE:

Developed by SuSE, acquired by the same company, mainly used for desktop environment, the interface is more cool, free.

4) Debian:

Internet spontaneous organization, the closest to the original flavor of Linux, for any environment, due to system stability, more for the server

5) Ubuntu:

Ubuntu is based on the Debian distribution and the GNOME desktop environment, and releases new versions every six months. For desktop bad environment

6) Redhat:

Early version is mainly used for desktop environment, free of charge. Since the release of Red Hat 9.0, Red Hat has no longer developed a desktop version of the Linux distribution package, and 04 years later does not provide technical support for Red Hat 9.0, after the server operating system Red Hat Enterprise Linux, the release of a new version every 18 months, The kernel is relatively low. Strive for stability, do not seek the latest.

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

1) All documents, organize almost all resources, including hardware devices into file format

2) consists of a number of single small programs, a program to achieve only one function, the combination of small programs to complete complex tasks

3) Try to avoid interacting with the user:

4) Save configuration information using plain text files

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.

1) ifconfig: Display or configure network devices

Usage: ifconfig [-v] [-a] [-s] [interface]--View network device information

Instance

[[email protected] ~]$ ifconfig    //View all network device information [[email protected]  ~]$ ifconfig -a    //ibid. [[Email protected] ~]$ ifconfig  wlp3s0    //View details of the specified network device  wlp3s0: flags=4163<up,broadcast,running, multicast>  mtu 1500        inet 192.168.0.102   netmask 255.255.255.0  broadcast 192.168.0.255         inet6 fe80::82a5:89ff:fe58:e60f  prefixlen 64  scopeid  0x20<link>        ether 80:a5:89:58:e6:0f   txqueuelen 1000   (Ethernet)         rx packets  1445  bytes 270800  (264.4 kib)          Rx errors 0  dropped&nBsp;0  overruns 0  frame 0        tx  packets 680  bytes 103589  (101.1 kib)          tx errors 0  dropped 0 overruns 0  carrier 0   collisions 0

2) Echo: Echoing request

Usage: Echo:echo [-nee] [parameters ...]

Instance

[[email protected] ~]$ echo $SHELL//request to display the shell program currently in use, $SHELL environment variable/bin/bash[[email protected] ~]$ echo "$SHELL"//double quotes Strong reference, direct output $shell the value of the environment variable/bin/bash[[email protected] ~]$ echo-e ' $SHELL '//single quote is a weak reference, do not reference the value of the variable, direct output string;-e: Start the transfer character, such as \ n line break $shell

3) TTY: View the file name of the current terminal device

Terminal: The device that the user must use to interact with the host

Classification of terminals:

Physical Terminal: Directly involved in the display and keyboard of the machine: console

Virtual Terminal: A software-based virtual terminal attached to a physical terminal, CentOS 6 launches 6 virtual terminals by default Ctrl+alt+fn:[1 6]

Graphics Terminal: The terminal that is attached to the physical terminal in the virtual implementation of the software, but provides additional desktop environment, device file path:/dev/tty#

Analog Terminal: Open command line interface under graphical interface, remote Open Interface based on SSH protocol or Telnet laundry, device file:/dev/pts/# [0 oo]

Usage: TTY [options] ...

[[email protected] ~]$ TTY//analog terminal used/DEV/PTS/2

4) StartX: Display graphics terminal

5) Export: Sets or displays environment variables.

Instance

[Email protected] jun_shao]# export Histcontrol=ignorespace

6) PWD: Displays the name of the current working directory

Instance

[Email protected] ~]$ Pwd/home/jun_shao

7) History: Manage historical command, all command history exists in cache

A. Newly executed commands logged into the shell are only recorded in the cache

B. When logging in to the shell, it reads the command history file.

Usage: history:history [-c] [-D offset] [n]

[[Email protected] ~]$ history//Show historical commands include commands in cache [[email protected] ~]$ history-c//Empty History command [[email protected] ~]$ his TORY-D 111//Delete the historical command with an offset of 111 [[email protected] ~]$ history-a//Add the History command in the cache to the history command file manually. bash_history

How to invoke commands in the Manage History command:

!#: Repeat # # directives

!! : Executes the previous command

!string calls the most recent command that starts with string

!$: Call the last parameter of the previous command

ESC,.: Call the last parameter of the previous command

Instance

[[email protected] ~]$!245//Repeat the command No. 245 in the Management History command Lsvmware Public template video picture document download music desktop [[email protected] ~]$!!    Repeat the previous command Ls/usr/bin etc Games include Lib Lib64 libexec local sbin share src tmp[[email protected] ~]$!l Call the most recent command starting with L Ls/usr/bin etc Games include Lib Lib64 libexec local sbin share src tmp[[email protected] ~]$ L s!$//Call the last parameter of the previous command Ls/etc/fstab/etc/fstab

Environment variables:

Histsize: Number of records in the command history

Histfile: Displays the path to the current user management history file ~/.bash_history

Histfilesize: The number of history records in a command history file

Instance

[Email protected] jun_shao]# echo $HISTFILE/root/.bash_history

Control how the command history is recorded

Environment variable: Histcontrol

Ignoredups: Ignore consecutive and repetitive commands, system default

Ignorespace: Ignores all commands that start with whitespace

Ignoreboth: Both are in effect at the same time

Instance

[[email protected] jun_shao]# echo $HISTCONTROL//view current shell use that way to record historical commands Ignoredups[[email protected] jun_shao]# export H Istcontrol=ignorespace//change how the shell record history is used, only valid for the current shell [[email protected] jun_shao]# echo $HISTCONTROLignorespace

8) Shutdown: Shutdown and restart system commands

Usage: Shutdown [OPTIONS ...] [TIME] [WALL ...]

Instance

[[email protected] jun_shao]# shutdown-r 10//10 minutes after restart system [[email protected] jun_shao]# shutdown-h 10//very close after system [email Protected] jun_shao]# shutdown-c//Cancel reboot and shutdown system

9) Poweroff: Shutdown command

Reboot: Restart command

Hwclock: Displays the computer's hardware clock

Usage: hwclock [features] [options ...]

Instance

[[email protected] jun_shao]# Hwclock//display hardware clock [[email protected] jun_shao]# hwclock-s//Set system time from hardware clock [email protecte D] jun_shao]# hwclock-w//Set hardware clock from current system time

Date: View or set the system time

Usage: date [options] ... [+ format]

Or: Date [-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]

Instance

[[Email protected] jun_shao]# Date//display system [[email protected] jun_shao]# Date +%f//Full date format, equivalent to%y-%m-%d[[email protect Ed] jun_shao]# Date 0820222216.23//Set system time August 20, 2016 Saturday 22:22:23 CST


This article is from "June's personal blog" blog, please be sure to keep this source http://june1015.blog.51cto.com/4804270/1836344

Linux first time job

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.