Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

List the distributions of Linux by series and describe the links and areas between different distributions

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

one。 Lists Linux distributions by series and describes the connections and differences between different distributions.

Debian is the only one of the three major distributions that operates as a community rather than a commercial company. Is a cooperative organization dedicated to creating a free operating system. And most of the basic tools in the operating system created by debian developers come from the GNU project.

Fedore is an operating system based on linux, and it is also a set of software that keeps the computer running normally. Sponsored by Red Hat.

Suse is a Linux based on the secondary development of Slackware, mainly used for commercial desktops and servers.

Links between different distributions:

All distributions use the Linux kernel; all need to follow GNU's GPL (General Public License) protocol

Differences between different distributions:

The essential difference between distributions lies in inheriting the composition of different versions of kernels, libraries and programs. Different distributions almost use different package managers (SLES, Fedora, openSUSE, centos, RHEL use rmp package management system, package files have the extension RPM; Ubuntu series, Debian series use DPKG-based package management system, and package files have the extension deb.)

two。 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.

three。 Configure the environment variable so that you can see the time when the command is executed when the history is executed.

1. Add a new line to the ~ / .bash_profile file, write: HISTTIMEFORMAT= "% F% T", and save exit.

[root@node1] # vim .bash _ profile# .bash _ profile# Get the aliases and functionsif [- f ~ / .bashrc]; then. ~ / .bashrcfi # User specific environment and startup programsPATH=$PATH:$HOME/binHISTTIMEFORMAT= "% F% T" export PATH

two。 To make the updated configuration file effective, execute:

Source / .bash_profile

3. Verification

[root@node1] # history 1 "2020-02-07 19:12:59 ifconfig 2" 2020-02-07 19:12:59 hostname 3 "2020-02-07 19:12:59 hostnamectl set-hostname node1 4" 2020-02-07 19:12:59 cat / etc/hosts 5 "2020-02-07 19:12:59 reboot 6" 2020-02-07 19:12:59 ifconfig 7 "2020-02-07 19:12: 59 cd / 8 "2020-02-07 19:12:59 ls 9" 2020-02-07 19:12:59 ipconfig 10 "2020-02-07 19:12:59 ifconfig 11" 2020-02-07 19:12:59 nmtui IV. Summarize the philosophy of Linux.

1. Everything is documented (and so are hardware devices)

two。 Made up of many Mini Program with a single purpose, a program does only one thing and is better.

3. Combine Mini Program to accomplish complex tasks

4. Avoid interaction with users as much as possible

5. Save configuration information using a text file

6. Provide mechanisms, not policies.

# V. Summarize the format of commonly used Linux commands and illustrate them with examples. Such as echo, screen, date, ifconfig, export, etc.

Options take two forms:

  short option:-C, for example-l,-d

   Note: the options for some commands are not-

If    uses multiple short options at the same time, most of them can be merged:-l-d =-ld

  length option:-- word, such as-- help,-- human-readable

   Note: long options cannot be merged

  Note: some options can be made without parameters. This is called option parameters.

# # echo

The echo command is used to print the value of the shell variable in shell, or to output a specified string directly. The echo command of linux is very commonly used in shell programming, and it is also often used when printing variable value under the terminal, so it is necessary to understand the usage of echo. The function of echo command is to display a section of text on the display, which generally plays the role of a prompt.

Grammar

Echo (option) (parameter)

Option

-e: activates the escape character.

# # screen

Screen is a free software developed by GNU for command line terminal switching. Through the software, users can connect multiple local or remote command line sessions at the same time and switch freely between them. GNU Screen can be thought of as the command-line interface version of the window manager. It provides a unified interface for managing multiple sessions and corresponding functions.

Grammar

Screen [- AmRvx-ls-wipe] [- d] [- h] [- r] [- s] [- S]

Option

-An adjusts all windows to the size of the current terminal. -d takes the specified screen job offline. -h specifies the number of buffer rows for the window. -m forces the creation of a new screen job even if it is already in the job. -r resumes offline screen jobs. -R first attempts to resume offline jobs. If an offline job cannot be found, a new screen job is created. -s specifies the shell to be executed when a new window is created. -S specifies the name of the screen job. -v displays version information. -x resumes previously offline screen jobs. -ls or-- list displays all current screen jobs. -wipe checks all current screen jobs and deletes screen jobs that are no longer available

# # date

The date command displays or sets the system time and date.

Grammar

Date (option) (parameter)

Option

-d: displays the date and time indicated by the string. The string must be enclosed in double quotation marks;-s: sets the date and time according to the string. The string must be enclosed in double quotation marks;-u: display GMT;--help: online help;-- version: display version information.

Parameters.

Specifies the date-time format to use when displaying

List of date format strings

% H hours, 24 hours (000023)% I hours, 12hrs (0112hours)% k hours, 24hrs (01hours 23)% l hours, 12hours (1hours 12)% M minutes (000059)% p shows AM or PM%r display time, 12hrs (hh:mm:ss% p)% s seconds experienced from January 1, 1970 to 00:00:00 currently experienced S display seconds (000059)% T display time 24-hour system (hh:mm:ss) X display time format (H:%M:%S) Z display time zone Date field (CST)% a week abbreviation (Sun~Sat)% A week full name (Sunday~Saturday)% hline% b month abbreviation (Jan~Dec)% B month full name (January~December)% c date and time (Tue Nov 20 14:12:58 2012) d day of a month (01y31)% x D date (mm/dd/yy) j Day of year (001y366) m month (01y12)% w Day of week (0 represents Sunday) W week ordinal of year (000053) Monday is the first day) the last two numbers of the y year (1999 is 99)

Example

Formatted output:

Date + "% Y-%m-%d" 2009-12-07

# # ifconfig

The ifconfig command is used to configure and display the network parameters of the network interface in the Linux kernel. The network card information configured with the ifconfig command will not exist after the machine is restarted after the network card is rebooted. If you want to keep the above configuration information on your computer forever, you need to modify the configuration file of the network card.

Grammar

Ifconfig (parameter)

Parameters.

Add: set the ip address of the network device IPv6; del: delete the IP address of the network device IPv6; down: turn off the specified network device

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report