( stay Windows In the operating system , Path adoption “\”, stay Linux In the operating system , Path adoption “/”)
PowerShell( contain ise Script tool )
one . Operation of directories and files
1.cd( Switch directory )chdir
cd /d c:
cd command
/d option
c:\ parameter ( route )
2.dir( Display all contents under the current file , Include files , folder )
dir /a:h express /a Properties of
Show hidden files in the current folder , folder
:h express /a Properties of
3.md ( Directory creation , You can create multiple directories at once , Parent directory does not exist ) mkdir
md c:
4.rd( Delete directory )
rd /s /q rd c:\zhangsan
/s Deleting a multi tier directory is mandatory
/q Quiet mode , No reminder
5.move( move file , Rename files and directories )
move c:\111 c:\1212 Moving from current to current is renaming
6.copy( copy )
copy e:\1212* c:
take e Under disk 1212 Copy all files in folder to c disc
7.xcopy( Generally used to copy directories )
xcopy /e Company folder e:\ Company folder
/e Copy directories using , Include empty folders
8.del( Delete one or more files , Do not delete folder )
del c:\ Company folder
two , Text operation ( Text document )
1.type( Display text content )
type c:\3.txt Text document content only
2.> redirect ( Redirect the output of a command to a previous input file , The correct content will be entered into the file )
ipconfig> ip.txt
3.| The Conduit ( Take the result output from the previous command as the object input later , Class filtering )
nslookup www.baidu.com | findstr name
4.findstr( Find string in file )
three , Network related commands
1.ipconfig( see TCP/IP parameter )
TCP/IP parameter
-IP address : Identify a host in the network ( An interface )
- Subnet mask : Usually with ip Simultaneous use , Used to represent the range of the network
- gateway : Host to host interface of router ip Address of
-dns address : Domain name resolution , Access domain name must be configured correctly DNS address
Only view ip address , Subnet mask , Default gateway
If you want to view details ipconfig /all
2.ping( Detect network connectivity )
3.tracert Route tracking ( Used to track how many routers the destination passes through )
4.nslookup Domain name resolution
5.netstat View the number of connections to the host (tcp udp)
netstat -anop tcp
6.telnet Remote connection , Check whether the port of a host is open ( be confined only to tcp port )
telnet 192.162.161.145 3389? default 23
7.route View the routing table of this machine
8. Set fixed TCP,IP parameter
ip There are generally two ways to set the address
- Static settings (static)
netsh interface ip set address “ Ethernet ” static 192.168.100.100 255.255.255.0
192.168.100.1
192.168.100.100 255.255.255.0 ip Address and subnet mask
192.168.100.1 default gateway
netsh interface ip set dnsservors “ Ethernet ” static 114.114.114.114
netsh interface ip add dnsservors “ Ethernet ” index=2 8.8.8.8
- Dynamic settings (DHCP)
netsh interface ip set address “ Ethernet ” dhcp
netsh interface ip set dnsservors “ Ethernet ” dhcp
9.arp( Address resolution protocol : A known ip Address resolves to MAC address )
arp -a see arp Cache table ( Including dynamic learning and static binding )
arp -d Empty cache table
arp -s Static binding
Access is often denied
netsh -c “i i” add neighbors 9 “192.168.19.28”“00-E1-8C-EB-3A-52”
netsh interface ip add neighbors 9 “192.168.19.28”“00-E1-8C-EB-3A-52”
Technology
Daily Recommendation