Marco Linux operations first week

Source: Internet
Author: User
Tags temporary file storage

Content of this week's job:

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

The computer consists of two parts

Hardware and software, respectively

The hardware consists of five parts:

<1 Controller

<2 Arithmetic Device

<3 Memory

<4 input Device

<5 Output device

CPU is a set of controllers and operators, the function is to control the program and the processing of data

Storage of memory and hard disk data and cached data

The motherboard is the bus for I/O devices

Mouse keyboard for I/O devices

The software is divided into 2 parts

System software

Refers to the control and coordination of external devices and supports the use of application software. The main operating systems are Windows, Linux, Unix, Apple iOS

Application software

Application software is based on the system software to meet the end user better use of the computer


The hardware is similar to the human skeleton; the system resembles the human neuron, the command that can be received by the head, walking, secretion, software similar to people and others, when learning more things, the software is quite optimized, at this time to communicate with others appear more mature.


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


RedHat

Centos

RHEL

Fedoracore

The Fedora series was updated by the original Redhat and distributed by Linux enthusiasts, together with the kernel. is the fastest-updating system in Redhat, while Rhel is the commercial version of the Linux,rhel program that is screened by Fedora for the most stable program. mainly used on servers; CentOS is the open source version of Rhel, updated after Rhel, and follows the principle of open source free. Update cycle: Fedora6 months, RHEL18 months, CentOS, Rhel update within 1-2 months


Debian

Ubuntu

Debian

Debian is by far the most GNU-compliant Linux system, and Ubuntu is based on the unstable version of Debian, so to speak, Ubuntu is a near-perfect possession of all the advantages of Debian, as well as the strength of its strengths. Linux Desktop System


Gentoo

Gentoo is the youngest distribution in the world of Linux


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


The philosophical thought of Linux is the use and learning environment of freedom and development

Torvalds based on Minix personal system dissatisfaction, not satisfied because the CPU and MINIX system can only work, scalability is limited, then he intends to start writing the core, which is the Linux 0.0. Version 2 of the kernel begins. Since it is not possible to run the original UNIX program on Linux, he modifies Linux so that Linux programs can conform to UNIX's operating specifications. Since then, hardware-compatible drivers, more refined software such as Apache, such as Linux for the public, the network of hackers have been joined to change the open source work. Of course, in the initial stage of the proposal, in order to develop and free this condition, requires developers in the Linux kernel, programs, drivers need to join the GNU GPL licensing model.


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.


Ifconfig

Function: Configure and display network interface parameters

Ifconfig Displaying network connection information

Ifconfig eth0 up network interface 0

Ifconfig eth0 down network interface 0

Ifconfig eth0 Add 172.16.249.1 16 Configure network interface 0 IP address for 172.16.249.1 mask to 255.255.0.0


Echo


Displays the specified string for the output


Usage

echo [short option] [parameter] [-nee]

echo [long option] \ \ \b \c


[Email protected] ~]$ echo hao old is you?

Hao old is you?


Echo-n "Parameters" • Not displayed on a new line

Echo-e "Parameters" • Application of backslash command parsing

Echo-e "Parameters" • Do not apply a backslash command parsing


TTY


Display Terminal connection standard output file name


Tty-s "Parameters"

[[email protected] ~]$ TTY

/dev/pts/0


StartX


Used to start X window, the program that actually launches X window is Xinit


Export


Used to output a shell variable as an environment variable, or to output a shell function as an environment variable


[Email protected] ~]$ export you= "How is old is you?"

[Email protected] ~]$ echo $you

How is old is you?

Add variable you = what old is?


pwd


Displays the user's current working directory as an absolute path


PWD "option"


[Email protected] ~]$ pwd

/home/rex


history


Display the manipulated command history directory and sort by number


Histroy "option"

-C Clear All

-D Delete the specified record


shutdown


Shutting down the system

Shutdown "option"

-R Restart after shutdown

-H turn off the system and power off


[Email protected] ~]# shutdown +100 "system would shutdown after minutes"

Broadcast message from [email protected]

(/dev/pts/0) at 21:08 ...

The system is going down for maintenance in minutes!

System would shutdown after minutes


Poweroff


Shut down the system and power off the system


Shutdown "option"

-F Force Shutdown system

-W does not really shut down the system, only recorded in the Wtmp file

[Email protected] ~]# poweroff-w


reboot

Rebooting the system

Reboot "option"

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

-P: Change to turn off the computer

[email protected] ~]# reboot


Hwclock

Display or modify hardware time

Hwclock "function" "Parameters"

--set settings

--date time

[Email protected] ~]# hwclock--set--date= "22:03:00 040816"

[Email protected] ~]# Hwclock

Mon 2004 10:03:05 PM PDT-0.344116 seconds


Date

Display or modify the current system time


Date "parameter"


[[Email protected] ~]# date + "%A"

Tuesday

[[Email protected] ~]# Date + "%m-%d-%y or%F"

08-02-16 or 2016-08-02

%t display time%h,%m minutes,%s seconds

[[Email protected] ~]# Date + "%T or%h-%m-%s"

16:31:48 or 16-31-48


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.


Linux can use the following commands to get help


Info "command"

Help "Command"

"Command"--help &-Help

Man "Command"


Because the man page of man pages is in the less program (which makes it easy to flip and flip the screen), all options for less are available in the man page. The more important function keys in less are: [Q] Exit; [Enter] a row of the ground, [Space] a page down, [b] a page; [/] followed by a string and [Enter] to find the string; [n] finds the next match for the last lookup. Manual page man pages provide a lot of information in very little space.


Man has nine chapters, namely Man1-man9

1. User commands (env, LS, echo, mkdir, TTY)

2. system calls or kernel functions (link, sethostname, mkdir)

3. Library Program (Acosh, Asctime, Btree, Locale, XML::P arser)

4. Device-related information (Isdn_audio, mouse, TTY, zero)

5. File format description (keymaps, MOTD, wvdial.conf)

6. Game (note that a lot of games are now graphical, in addition to the manual page system, there are graphical help information)

7. Other (ARP, boot, regex, Unix UTF8)

8. System Management (DEBUGFS, Fdisk, fsck, Mount, Renice, RPM)

9. Kernel


6, please list the Linux distribution version of the basic directory name of the law and function provisions


/(Root path, highest system directory)


1./boot

Boot file directory, kernel file (vmlinuz), boot loader (bootloader, grub) are stored in this directory

2,/bin

A basic command for all users, and a program that can be used for OS startup if it cannot be associated to a separate partition.

3,/sbin

A basic command of the management class, a program that can be used when the OS is started, and cannot be associated to a separate partition.

4,/lib

Basic shared library files, as well as kernel module files (/lib/modules).

5,/lib64

Dedicated to the storage location of secondary shared library files on x86_64 systems.

6./etc

System configuration file directory (plain text file)

7,/home/

Normal User home Directory

8,/root

Administrator's home directory

9,/media

Portable mobile device mount point CDROM, USB

10,/mnt

Temporary file system mount point

11./dev

Device files and special file storage locations

12,/opt

Installation location for third-party applications

13,/srv

Data that is used by services running on the system.

14,/tmp

Temporary file storage location

15./usr

Directory of System storage programs

16./var

Look at the name to know, we can understand the abbreviation for vary, the contents of this directory is constantly changing

Cache: The application caches the data directory;

LIB: Application state information data;

LOG: Logs directory and files;

OPT: Dedicated to storing variable data for applications under/OPT;

TMP: Saves the temporary data generated between the two reboots of the system;

17,/proc:

Virtual file system for output kernel-related process information (Linux tuning)

18,/sys

A virtual file system for outputting information about hardware devices on the current system.


Marco Linux operations first week

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.