1,linux the distribution of each release, the relationship between, and the difference between
There are mainly the following distributions
Debian-based, mainly Debian, Ubuntu, mint
Debian is a free distribution that is maintained by community organizations and is fully compliant with the GNU code. Using the Dpkg package management method
Ubuntu is a Debian-based Linux system for desktop untable two releases
Mint is a re-released version of Ubuntu
Based on Slackware, Slackware, Suse,opensuse
Slackware is a system that maintains a concise style and is biased towards Unix-style.
SuSE is also a Slackware-based release, maintained by the German SuSE Linux AG and widely used in Europe
openSUSE is a free version of SuSE-based personal
Based on Red Hat, mainly Redhat Enterprise Linux, Fedora, CentOS
Redhat Enterprise Linux is a corporate-oriented version of Red Hat Corporation
Fedora is a personal version of the Red Hat company that replaces Redhat Linux
CentOS is a version of the open source community that relies on Red Hat Enterprise open source code to recompile
Based on Gentoo, mainly Gentoo Linux, etc.
Gentoo Linux is a distribution for developers and network professionals
2, explains the use format of the command on the Linux system; details Ifconfig, Echo, TTY, STARTX, export, pwd,
The use of the history, shutdown, Poweroff, reboot, Hwclock, and date commands, and is elaborated in conjunction with the corresponding examples.
Ifconfig Configuring the Network interface
UP/DOWN specifies the interface to open/close ifconfig eth0 up/down
Addr manual configuration IPv4 address ifconfig eth0 1.1.1.1 netmask 255.255.255.0 broadcast 1.1.1.255
Netmask Configuration Mask
[-]arp shutdown/Turn on ARP function ifconfig eth0-arp//Off
[-]promisc off open support interface all packets
[-]allmulti turn off, turn on support multicast
-A Show all interfaces
-S Display network card information summary, MTU/RX/TX
MTU value, HW ether Modify MAC address, broadcast modify broadcast address
Add config IPv6 address, del delete IPv6 address
Tunnel configuration (6to4) tunnel address, metric network card cost value, Txqueuelen queue Length
ECHO is used for Echo,-n does not output line breaks,-e allows backslash escaping,-e prohibits escaping using
Special characters for output, \ \ Backslash, \a alarm, \b backspace, \c no trailing line break, \f page break, \ n line break
\ r Enter, \ t horizontal tabulation, \v longitudinal tabulation
The file name of the standard input for the TTY terminal connection
StartX enabling the Graphical interface
Export display and SET environment variable a=1, export a import, export-n a Delete,
env Display current user environment, export path= $PATH:/usr/local/bin Modify Environment variables
PWD Displays the current directory,-P displays the physical address of the soft link, and-l displays the logical address of the soft link
History Displays the current command record, n shows nearly N,-a adds a record to the file,-R reads the record in the file,-W overwrites the record in the history file,-C clears the record,-D deletes the specified nth record,! 4 Execute the command of number 4,!$ get the last parameter
Shutdown shut down the machine and notify the user and prohibit the new user to log in, wait for the appropriate time, clear the buffer data, reduce the program run level init0,-R Restart now immediately, or specify the time, and give notice-h/h, specify the time off, and inform the user
Power off is similar to shutdown-h now, reboot similar to Shutdown-r now
Hwclock display hardware clock--set--date= "month/day/year HH:MM:SS" Set hardware clock--hctosys sync to system clock
Date display system clock,-s ' 10:10:10 ' set clock, +%y%m%d%h%m%s by Format-u set to GMT,-r < file > show file last Modified time
3. Get command Help: Please list in detail and describe how the chapters of the man document are divided.
Use the Help command for command in Shell
External command using man help manual, info command, etc.
Program Readme, official site of the program, official documentation of the distribution, Internet search
Man is divided into man1 for user commands, man2 system calls, MAN3 for C libraries, MAN4 devices and special files, MAN5 profile format, man6 for games, Man7 Miscellaneous, MAN8 for system administrator commands
What are the file management class commands on 4,linux, their common usage methods, and their associated example demonstrations.
CP, MV, RM file management
Cp-f-v/etc/passwd/tmp/password, Cp-a-r/etc/shadow/etc/passwd/tmp/test/
Mv-f/etc/fstable/tmp/test.fstable, mv/tmp/test1//tmp/test2/, mv-t./test3 abc.txt
rm-rfv/tmp/test2/, Rm-f/tmp/abc.txt, Rm/tmp/abc.txt
5, Bash's work features the command execution status return value and command-line expansion involved in the content and its sample demonstration.
echo $? Command execution status, mkdir/tmp/{a,b},
6, use the command line expansion feature to complete the following exercises:
(1), create/tmp directory: A_c, A_d, B_c, B_d
TOUCH/TMP/{A,B}_{C,D}
(2), create the/tmp/mylinux directory:
mylinux/
├──bin
├──boot
│└──grub
├──dev
├──etc
│├──rc.d
││└──init.d
│└──sysconfig
│└──network-scripts
├──lib
│└──modules
├──lib64
├──proc
├──sbin
├──sys
├──tmp
├──usr
│└──local
│├──bin
│└──sbin
└──var
├──lock
├──log
└──run
Mkdir/tmp/mylinux/{bin,boot,dev,etc,lib,lib64,proc,sbin,sys,tmp,usr,var,lock,log,run}
Mkdir-p/tmp/mylinux/grub/tmp/mylinux/rc.d/init.d/tmp/mylinux/sysconfig/network-scripts
Mkdir-p/tmp/mylinux/lib/modules/tmp/mylinux/usr/local/{bin,sbin}
7, what is the metadata information of a file, what does it mean, and how to view it? How to modify timestamp information for a file.
File path strength and name, file size, number of blocks, block size, type
Device value, index value, number of links
File permissions, UID number and name, GID number and name
Access time, modify time, change time
stat/etc/, Touch-a-m-t [[CC]YY]MMDDHHMM[.SS]
8, displays all files or directories that start with L in the/var directory, end with a lowercase letter, and have at least one digit (can have other characters) in the middle
ls-lhr/var/| Egrep ^1[0-9a-za-z]*[[:d igit:]]\\\\+[0-9a-za-z]*[[:lower:]]$
9, displays files or directories that start with any number in the/etc directory and end with a non-numeric number.
ls-lhr/etc/| Egrep ^[0-9][[:alnum:]]*[^0-9]$
10, display in/etc directory, starting with a non-letter, followed by a letter and any other arbitrary length of any character file or directory
ls-lhr/etc/| Egrep ^[^[:alpha:]][[:alpha:]][[:alnum:]]*
11, in the/tmp directory, create a file that begins with Tfile, followed by the current date and time, with a filename such as: tfile-2016-09-20-09-32-22.
Vim
#!/bin/bash
Time= ' Date +%y-%m-%d-%h-%m-%s '
Filename=$1$time
Touch $filename
: Wq
#chmod +x create_file.sh
#./create_file.sh Tfile
12, copy all files or directories ending with. D in the/etc directory into the/tmp/mytest2 directory.
Mkdir/tmp/test2
Cp-r/etc/*.d/tmp/mytest2
13, copy all files that start with L or M or N and end with. conf in the/etc/directory to the/TMP/MYTEST3 directory.
Mkdir/tmp/mytest3
Cp-r/etc/{l,m,n}*.conf$/tmp/mytest3
Linux Practice Jobs