The first week of the operation and maintenance of the N45

1. List Linux distributions by series and describe the connections and differences between different distributions.
Debian Debian in a
broad sense refers to a cooperative organization and its work dedicated to creating a free operating system. Since many kernel branches of the Debian project are mainly Linux macro kernels, and most of the basic tools in the operating system created by Debian developers come from For the GNU project, "Debian" often refers to Debian GNU / Linux.

Ubuntu
Ubuntu is a Linux operating system based on the Debian distribution with Unity as the default desktop environment. He is one of the most popular distros in the world, the latest distro is optimized for desktop, mobile and its desktop mobile hybrid.

RHEL
Red Hat's enterprise version of Linux; a commercial derivative of Fedora, designed for enterprise customers. It provides many variations, plug-ins, and certifications for administrators and applications.

CentOS
CentOS is an enterprise-level Linux distribution based on the freely available source code provided by Red Hat. It is a product of RHEL source code recompilation and is completely open source and free; many known BUGs have been corrected on the basis of RHEL. Linux distribution, its stability is trustworthy.

Fedora
Fedora is an open source community system supported by Red Hat; currently Fedora is positioned by Red Hat as a testing ground for new technologies, and many new technologies will be tested in Fedora; if stable, Red Hat will consider joining RHEL.

Arch Linux
Arch Linux is an independently developed x86-64 general-purpose GNU / Linux distribution; Arch is designed to be lightweight and concise, and it is aimed at users proficient in GNU / Linux.

OpenSUSE
OpenSUSE is a general-purpose GNU / Linux operating system based on the Linux kernel, developed and maintained by the openSUSE project community, which is sponsored by companies such as SUSE; OpenSUSE is rated as the most gorgeous Linux desktop distribution.

Linux Mint
Linux Mint is a Linux operating system distribution based on Ubuntu and Debian. It is hailed by many enthusiasts as "the best desktop application system", just like macOS in the Linux world, very suitable for personal daily office or development Computer use.


2. Install the Centos7.6 operating system, create a user name with your own name, and log in normally. Take a screenshot of the main steps.
Installation environment: VMware virtual machine, Centos7.6iso file prepared in advance

Enter VMware and click New VM, the following interface appears, click Next
The first week of the operation and maintenance of the N45

Select the correct path where the centos7.6iso file is located, and the next step
The first week of the operation and maintenance of the N45

Set a name and path for the virtual machine, the next step
The first week of the operation and maintenance of the N45

Set the size of the disk, choose to store the virtual disk as a single file, the next step
The first week of the operation and maintenance of the N45

Set the hardware configuration, and enter the virtual machine after the setting is completed
The first week of the operation and maintenance of the N45

Select the second item here, first verify the integrity of the disc file before installing, if the file is damaged, you can detect it in advance
The first week of the operation and maintenance of the N45

Enter the installation wizard, select the wizard language first
The first week of the operation and maintenance of the N45

Select time zone, keyboard and language (default English recommended)
The first week of the operation and maintenance of the N45

Installation file path, software package installation, partition and other settings
The first week of the operation and maintenance of the N45

A variety of software packages are available, I chose the minimum installation here
The first week of the operation and maintenance of the N45

Partition setting, choose autonomous partition here
The first week of the operation and maintenance of the N45

The standard partitions are used here; the size of each folder is allocated as needed; the recommended size of the swap partition is 2 times the memory
The first week of the operation and maintenance of the N45

After completing all the settings before installation, the root password should be set during the installation process, and users can also be added
The first week of the operation and maintenance of the N45

After the installation is complete, click reboot to restart
The first week of the operation and maintenance of the N45

Enter the system, the login is successful, and the partition is the same as previously set
The first week of the operation and maintenance of the N45

Login with another user is also successful
The first week of the operation and maintenance of the N45


3. Configure environment variables so that when executing history, you can see the time of executing the command.
Modify the environment variable configuration file
vim ~ / .bash_profile
HISTTIMEFORMAT = "% F% T"

Just source it
. ~ / .bash_profile
The first week of the operation and maintenance of the N45
The configuration here is only for one user. If you want to target all users, you must add a file in /etc/profile.d/
vim /etc/profile.d/history.sh
HISTTIMEFORMAT = "% F% T"
Import will take effect for all users
. /etc/profile.d/history.sh


4. Summarize the philosophy of Linux.
Everything is a file
abstracts almost all resources into a file form, including hardware devices, even communication interfaces, etc .; this can design a unified access control operation (open (), read (), write (), close (), delete () , create ()) interface, but also can further improve the streamlining of the kernel control source code.

It consists of many programs with a single function; one program only does one thing, and does a good
combination of small programs to complete complex tasks.

Try to avoid interacting with users as
easy as possible to achieve automated tasks programmatically, and automate function management and control with scripted programming. Avoid interactive intervention and affect the degree of automation.

Use text files to save configuration information.
Use text to manage the configuration information of the program, so that the program has richer features and functional performance.

Provide mechanism, not strategy
In Linux, there is a classic "only provide mechanism rather than strategy." In a general sense, the so-called mechanism is "what function to provide"; the strategy is "what function to achieve". This unique design idea provides designers with more space to better implement it. In the Chinese Encyclopedia, such a text about the military, "Will be able to defeat the king" (If there will be talent and the king will not rule, the war will win). In fact, the mechanism is like a "monarch" who does not blindly command. He only issues orders for what he wants to achieve, but does not give any specific actions. The generals decide at their own discretion.


5. Summarize the format of common Linux commands and use examples. For example, echo, screen, date, ifconfig, export, etc. The
echo command of the echo
shell is similar to the PHP echo command, and is used for the output of strings.

The screen
screen command is used for multiple window management programs.
Common options
-S <XX> Create a window named XX
-x <XX> Join a conversation window named XX
-ls Display all current screen operations

The date
date command can be used to display or set the system's date and time.
Common options
-u Display UTC time
-s datestr Set the system time to the time set in datestr
-d datestr Display the time set in datestr , use When displaying the timestamp time,
you can also format the time output, for example

date "+%F %T"

The first week of the operation and maintenance of the N45

ifconfig
ifconfig can display the network device status of the system

exprot
export can add, modify or delete environment variables for use in subsequent programs.
Commonly used option
-f stands for function name in [variable name].
-n Delete the specified variable. The variable is not actually deleted, but it is not output to the execution environment of subsequent instructions.
-p List all environment variables assigned to the program by the shell.

Guess you like

Origin blog.51cto.com/14730586/2486869