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,ifconfig Configuring the Network interface
Up/down specify interface on/off
Addr Manually Configuring IPV4 addresses
Netmask Configuration Mask
[-]arp shutdown/Turn on ARP function
[-]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 newline, \f page feed, \ n line break, \ r Enter, \ t horizontal tab, \v longitudinal tab
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 mode: Use the command for commands in the 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
4,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, Echo $? Command execution status, mkdir/tmp/{a,b},
6, Touch/tmp/{a,b}_{c,d}
Mkdir-p/tmp/\{bin,boot/\{grub\},dev,etc/\{rc.d/\{ini.d\},sysconfig/\{network-scripts\}\},lib/\{modules\},lib64 , proc,sbin,sys,tmp,usr\\{local\\{bin,sbin\}\},var,lock,log,run\}
7, file path strength and name, file size, block number, 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, ls-lhr/var/| Egrep ^1[0-9a-za-z]*[[:d igit:]]\+[0-9a-za-z]*[[:lower:]]$
9, ls-lhr/etc/| Egrep ^[0-9][[:alnum:]]*[^0-9]$
Ten, ls-lhr/etc/| Egrep ^[^[:alpha:]][[:alpha:]][[:alnum:]]*
One, 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
Mkdir/tmp/test2,
Cp-r/etc/*.d/tmp/mytest2
MKDIR/TMP/MYTEST3,
Cp-r/etc/{l,m,n}*.conf$/tmp/mytest3
Linux Practice Jobs