The most complete explanation of the entire network Windows CMD command Daquan

Introduction

cmdYes commandis short for command line

Although with the development of the computer industry, the application of the Windows operating system is becoming more and more widespread, and DOS is facing the fate of being eliminated, but because it is safe and stable, and some users are still using it, so the general versions of Windows Compatible, users can run DOS under the Windows system. The command prompt in the Chinese version of Windows XP further improves the compatibility with the operating commands under DOS. The user can directly input Chinese call files at the command prompt.

The commandcommand line can be opened by typing in the 9x system . On the NT system, it can cmdbe opened by typing . After Windows 2003, it is replaced by cmd. Use the CMDcommand to query the system information or judge the quality of the network. The following picture shows CMDthe interface after startup.
  Insert picture description here

Run operation

CMDCommand: 开始->运行->键入cmd或command(You can see the system version and file system version on the command line)

CMD Command Collection

  • gpedit.msc-----Group Policy
  • sndrec32-------recorder
  • Nslookup------- IP Address Detector is a command line tool that monitors whether DNS servers in the network can correctly implement domain name resolution. It can be used in Windows NT / 2000 / XP, but this tool is not integrated in Windows 98.
  • explorer------- Open Explorer
  • logoff--------- logout command
  • shutdown------- 60 seconds countdown shutdown command
  • lusrmgr.msc---- Local users and groups
  • services.msc—Local service settings
  • oobe/msoobe /a---- Check if XP is activated
  • notepad-------- Open Notepad
  • cleanmgr------- Garbage sorting
  • net start messenger---- Start Courier Service
  • compmgmt.msc—Computer Management
  • net stop messenger----- stop messenger service
  • conf----------- Start netmeeting
  • dvdplay-------- DVD player
  • charmap-------- Start Character Map
  • diskmgmt.msc—Disk Management Utility
  • calc----------- Start calculator
  • dfrg.msc------- Disk Defragmenter
  • chkdsk.exe----- Chkdsk disk check
  • devmgmt.msc— Device Manager
  • regsvr32 /u *.dll---- stop dll file running
  • drwtsn32------ System Doctor
  • rononce -p---- Shutdown in 15 seconds
  • dxdiag--------- Check DirectX information
  • regedt32-------Registry Editor
  • Msconfig.exe—System Configuration Utility
  • rsop.msc------- Group Policy Result Set
  • mem.exe-------- Display memory usage
  • regedit.exe-—Registry
  • winchat-------- XP comes with LAN chat
  • progman-------- Program Manager
  • winmsd---------system message
  • perfmon.msc---- Computer performance monitoring program
  • winver--------- Check Windows version
  • sfc /scannow----- Scan error and recover
  • taskmgr----- Task Manager (2000 / xp / 2003
  • wmimgmt.msc---- Open windows management architecture (WMI)
  • wupdmgr-------- Windows Update Program
  • wscript-------- Windows script host settings
  • write---------- WordPad
  • wiaacmgr------- Scanner and Camera Wizard
  • winchat-------- XP comes with LAN chat
  • mplayer2------- Simple widnows media player
  • mspaint--------painting board
  • mstsc----------remote Desktop connection
  • mmc-------- Magnifying glass utility
  • mmc------------ Open the console
  • mobsync-------- Synchronization Command
  • iexpress------- Trojan binding tools, the system comes with
  • fsmgmt.msc----- Shared Folder Manager
  • utilman-------- Auxiliary Tool Manager
  • dcomcnfg------- Open system component service
  • ddeshare------- Open DDE sharing settings
  • osk------------ Open the on-screen keyboard
  • odbcad32------- ODBC Data Source Manager
  • oobe/msoobe /a---- Check if XP is activated
  • ntbackup------- System backup and restore
  • narrator------- Screen "Narrator"
  • ntmsmgr.msc---- Mobile Storage Manager
  • ntmsoprq.msc—Mobile storage administrator operation request
  • netstat -an---- (TC) command to check the interface
  • syncapp-------- Create a briefcase
  • sysedit-------- System Configuration Editor
  • sigverif------- File signature verification program
  • ciadv.msc------ Index service program
  • shrpubw-------- Create a shared folder
  • secpol.msc----- Local Security Strategy
  • syskey--------- System encryption, once encrypted, it cannot be unlocked, protecting the double password of windows xp system
  • services.msc—Local service settings
  • Sndvol32------- Volume control program
  • sfc.exe-------- System File Checker
  • sfc /scannow—Windows file protection
  • ciadv.msc------ Index service program
  • tourstart------ xp introduction (roaming xp program that appears after installation)
  • taskmgr-------- Task Manager
  • eventvwr------- Event Viewer
  • eudcedit------- Word making program
  • compmgmt.msc—Computer Management
  • packager------- Object packaging procedures
  • perfmon.msc---- Computer performance monitoring program
  • charmap-------- Start Character Map
  • cliconfg------- SQL SERVER client network utility
  • Clipbrd-------- Clipboard Viewer
  • conf----------- Start netmeeting
  • certmgr.msc---- Certificate Management Utility
  • regsvr32 /u *.dll---- stop dll file running
  • regsvr32 /u zipfldr.dll------ Cancel ZIP support
  • cmd.exe-------- CMD command prompt

Detailed operation

  • net use ipipc$ " " /user:" " Establish an empty IPC link
  • net use ipipc$ "密码" /user:"用户名" Establish IPC non-empty link
  • net use h: ipc$ "密码" /user:"用户名" Map the other party C directly after login: H to local:
  • net use h: ipc$ After login, map the other party C: to H:
  • net use ipipc$ /del Remove IPC link
  • net use h: /del Delete the mapping of the counterpart to the local H:
  • net user Username password / add Create user
  • net user guest / active: yes activate guest user
  • net user See which users
  • net user Account name View account properties
  • net localgroup administrators 用户名 /add Add "user" to the administrator to give it administrator rights
  • net start See which services are turned on
  • net start 服务名 Start the service; (eg: net start telnet, net start schedule)
  • net stop 服务名 Stop a service
  • net time 目标ip View the other party's time
  • net time 目标ip /set Set the local computer time to synchronize with the "target IP" host time, plus the parameter / yes to cancel the confirmation
  • net view Check which sharing is enabled in the local area network
  • net view ip Check which sharing is enabled in the other party's LAN
  • net config Display system network settings
  • net logoff Disconnected share
  • net pause 服务名 Suspend a service
  • net send ip "文本信息" Send a message to the other party
  • net ver The type and information of the network connection being used in the LAN
  • net share View locally enabled shares
  • net share ipc$ Turn on ipc $ sharing
  • net share ipc$ /del Delete ipc $ share
  • net share c$ /del Delete C: Share
  • net user guest 12345 After logging in as the guest user, change the password to 12345
  • net password 密码 Change system login password
  • netstat -a Check which ports are opened, commonly used netstat -an
  • netstat -n View the network connection of the port, commonly used netstat -an
  • netstat -v View ongoing work
  • netstat -p Protocol name example: netstat -p tcq / ip to view the usage of a protocol
  • netstat -s View usage of all protocols in use
  • nbtstat -A ip If one of the other party's 136 to 139 ports is open, you can view the other party's recently logged in user name
  • tracert -参数 ip(或计算机名) Trace route (data packet), parameter: "-w number" is used to set the timeout interval.
  • ping ip(或域名) Send the data of the default size of 32 bytes to the host of the other party. Parameters: "-l [space] packet size"; "-n number of times to send data"; "-t" means to keep pinging.
  • ping -t -l 65550 ip The ping of death (send a file larger than 64K and keep pinging becomes the ping of death)
  • ipconfig (winipcfg) Used for Windows NT and XP (windows 95 98) to view the local IP address, ipconfig can display all configuration information with the parameter "/ all"
  • tlist -t The process is displayed in a tree line list (it is an additional tool of the system, which is not installed by default, in the Support / tools folder of the installation directory)
  • kill -F The process name is forced to end a process after adding -F parameter (for additional tools of the system, the default is not installed, in the Support / tools folder of the installation directory)
  • del -F 文件名After adding the -F parameter, you can delete the read-only files, / AR, / AH, / AS, / AA means to delete the read-only, hidden, system, archive files, / AR, / AH, / AS, / AA means to delete Files other than read-only, hidden, system, and archive. For example, "DEL / AR . " Means to delete all read-only files in the current directory, "DEL / AS . " Means to delete all files in the current directory except system files
  • del /S /Q 目录 或用:rmdir /s /Q 目录/ S deletes the directory and all subdirectories and files under the directory. At the same time, use the parameter / Q to cancel the system confirmation when deleting the operation and delete it directly. (The two commands have the same effect)
  • move The file name of the drive letter path to be moved stores the path of the moved file. After the file name is moved, the file name moves the file. The parameter / y will cancel the confirmation of the existence of the same file in the moving directory.
  • fc one.txt two.txt > 3st.txt Compare the two files and output the differences to the 3st.txt file, ">" and ">>" is the redirection command
  • at id号 Open a registered scheduled task
  • at /delete Stop all scheduled tasks, use parameter / yes to stop without confirmation
  • at id号 /delete Stop a registered scheduled task
  • at View all scheduled tasks
  • at ip time 程序名(或一个命令) /r Run the other party's program at a certain time and restart the computer
  • finger username @host See which users have logged in recently
  • telnet ip 端口 Yuanhe login server, the default port is 23
  • open ip Connect to IP (a telnet login command)
  • telnet Type telnet directly on the machine to enter the machine's telnet
  • copy 路径文件名1 路径文件名2 /y Copy file 1 to the specified directory as file 2, use parameter / y to cancel at the same time confirm that you want to rewrite an existing directory file
  • copy c:srv.exe ipadmin$ Copy the local c: srv.exe to the other party's admin
  • copy 1st.jpg/b+2st.txt/a 3st.jpg Hide the contents of 2st.txt into 1st.jpg to generate a new file of 3st.jpg. Note: The header of 2st.txt should be empty in three rows. Parameters: / b refers to binary file, / a refers to ASCLL format
  • copy ipadmin$svv.exe c: 或:copyipadmin$*.* Copy the srv.exe file (all files) shared by the other party's admini $ to local C:
  • xcopy To copy the file or directory tree target address directory name, copy the file and directory tree, use the parameter / Y will not prompt to overwrite the same file. Use the parameter / e to copy the subdirectories under the directory to the target address
  • tftp -i Own IP (this is the meat machine IP when using the meat machine as a springboard) get server.exe c: server.exe After logging in, download the "IP" server.exe to the target host c: server.exe Parameters: -i refers to Transfer in binary mode, such as when transferring exe files, or transfer it in ASCII mode (transfer text file mode) if -i is not added
  • tftp -iAfter the other party's IP put c: server.exe` login, upload the local c: server.exe to the host
  • ftp ip 端口Used to upload files to the server or perform file operations. The default port is 21. bin refers to the transmission in binary mode (executable file into); the default is ASCII format transmission (when text file)
  • route print Display IP routing, will mainly display the network address Network addres, subnet mask Netmask, gateway address Gateway addres, interface address
  • arpView and process the ARP cache, ARP means name resolution, and is responsible for resolving an IP into a physical MAC address. arp -a will display all information
  • start 程序名或命令 /max 或/min Open a new window and maximize (minimize) a certain program or command
  • mem View cpu usage
  • attrib 文件名(目录名) View the attributes of a file (directory)
  • attrib 文件名 -A -R -S -H or + A + R + S + H remove (add) the archive of a file, read-only, system, hidden attributes; use + to add as an attribute
  • dir View files, parameters: / Q shows which user the file and directory belong to, / T: C shows file creation time, / T: A shows file last accessed time, / T: W last modified time
  • date /t 、 time /t Use this parameter ie "DATE ​​/ T", "TIME / T" will only display the current date and time, without having to enter a new date and time
  • set 指定环境变量名称=要指派给变量的字符 Set environment variables
  • set Show all current environment variables
  • set p(或其它字符) Show all environment variables currently starting with the character p (or other characters)
  • pause Pause the batch process and display: press any key to continue ...
  • if Perform conditional processing in a batch program (see the if command and variables for more instructions)
  • goto The label directs cmd.exe to the labeled line in the batch program (the label must be on a separate line and start with a colon, for example: ": start" label)
  • call Path batch file name to call another batch program from the batch program (see call /? For more instructions)
  • for Execute a specific command for each file in a set of files (see the for command and variables for more instructions)
  • echo on或off Open or close the echo, only use echo without parameters to display the current echo settings
  • echo 信息 Display information on the screen
  • echo 信息 >> pass.txt Save "information" to pass.txt file
  • findstr "Hello" aa.txt Find the string hello in the aa.txt file
  • find 文件名 Find a file
  • title 标题名字 Change the CMD window title name
  • color 颜色值 Set the foreground and background colors of the cmd console; 0 = black, 1 = blue, 2 = green, 3 = light green, 4 = red, 5 = purple, 6 = yellow, 7 = white, 8 = gray, 9 = light blue , A = light green, B = light green, C = light red, D = light purple, E = light yellow, F = bright white
  • prompt 名称 Change the command prompt displayed by cmd.exe (change C: and D: to: EntSky)
  • ver Display version information in DOS window
  • winver A window pops up to display version information (memory size, system version, patch version, computer name)
  • format 盘符 /FS:类型 Format disk, type: FAT, FAT32, NTFS, for example: Format D: / FS: NTFS
  • md 目录名 Create a directory
  • replace 源文件 Directory replacement file to replace file
  • ren 原文件名 新文件名 Rename file name
  • tree The directory is displayed in a tree structure, and the parameter -f will list the file names in the first folder
  • type 文件名 Display the contents of a text file
  • more 文件名 Display output file screen by screen
  • doskey Command to be locked = character
  • doskey 要解锁命令=The lock command provided for DOS (edit the command line, recall the win2k command and create a macro) For example: lock dir command: doskey dir = entsky (doskey dir = dir cannot be used); unlock: doskey dir =
  • taskmgr Bring up the task manager
  • chkdsk /F D: Check disk D and display status report; add parameter / f and fix errors on disk
  • tlntadmn Telnt service admn, type tlntadmn to select 3, and then select 8, you can change the default port 23 of the telnet service to any other port
  • exit Exit the cmd.exe program or currently, use the parameter / B to exit the current batch script instead of cmd.exe
  • path The file name of the path executable file is an executable file and a path is set.
  • cmdStart a win2K command interpretation window. Parameters: / eff, / en turn off, turn on command expansion; for more details, see cmd /?
  • regedit /s The registry file name is imported into the registry; the parameter / S refers to quiet mode import without any prompt;
  • regedit /e Registry file name export registry
  • cacls 文件名 参数Display or modify the file access control list (ACL)-for NTFS format. Parameters: / D user name: set to deny access to a user; / P user name: perm replaces the access rights of the specified user; / G user name: perm gives the specified user access rights; Perm can be: N none, R read, W write, C change (write), F has full control; for example: cacls D: est.txt / D pub set d: est.txt to deny pub user access.
  • cacls 文件名 View the file access user permission list
  • REM 文本内容 Add comments in batch file
  • netsh View or change the local network configuration

New commands under the win2003 system (practical part)

  • shutdown /参数 Shut down or restart the local or remote host.
  • 参数说明:/SShut down the host, / R restarts the host, the / T number sets the delay time, the range is between 0 and 180 seconds, / A cancels the boot, / M // IP specifies the remote host.
    Example: shutdown / r / t 0 restart the local host immediately (no delay)
  • taskill /参数 The process name or process pid terminates one or more tasks and processes.
  • 参数说明:/PID To terminate the pid of a process, use the tasklist command to obtain the pid of each process, / IM the process name of the process to be terminated, / F to force the process to terminate, / T to terminate the specified process and the child processes he started.
  • tasklist Displays the processes, services, and process identifiers (PID) of the processes currently running on the local and remote hosts.
  • 参数说明:/M List the dll files loaded by the current process. / SVC shows the corresponding service of each process. If there is no parameter, only the current process is listed.

IIS Service Command

  • iisreset /reboot Restart the win2k computer (but there will be a prompt that the system will restart the message appears)
  • iisreset /start或stop Start (stop) all Internet services
  • iisreset /restart Stop and restart all Internet services
  • iisreset /status Show all Internet service status
  • iisreset /enable或disable Enable (disable) restart of Internet services on the local system
  • iisreset /rebootonerror When starting, stopping or restarting Internet services, restart the computer if an error occurs
  • iisreset /noforce If the Internet service cannot be stopped, the Internet service will not be forcibly terminated
  • iisreset /timeoutWhen Val reaches the timeout (seconds), the Internet service has not been stopped. If / rebootonerror is specified, the computer will restart. The default value is 20 seconds to restart, 60 seconds to stop, and 0 seconds to restart.

FTP commands

The command line format of ftp is:

ftp -v -d -i -n -g [host name]
-v Display all the response information of the remote server.
-D Use debugging mode.
-N Restrict automatic login of ftp, that is, do not use .netrc file.
-G cancel the global file name.

  • help [命令] 或 ?[命令] View command description
  • bye 或 quit Terminate the host FTP process and exit the FTP management mode.
  • pwd List the current remote host directory
  • put 或 send 本地文件名 [上传到主机上的文件名] Transfer a local file to a remote host
  • get 或 recv [远程主机文件名] [下载到本地后的文件名] Transfer from remote host to local host
  • mget [remote-files] Receive a batch of files from the remote host to the local host
  • mput local-files Transfer a batch of files from the local host to the remote host
  • dir 或 ls [remote-directory] [local-file] List the files in the current remote host directory. If there is a local file, write the result to the local file
  • ascii Set to transfer files in ASCII mode (default)
  • bin 或 image Set to transfer files in binary mode
  • bell Every time the file transfer is completed, the alarm prompts
  • cdup Return to the previous directory
  • close Interrupt the ftp session with the remote server (corresponding to open)
  • open host[port] Establish a specified ftp server connection, you can specify the connection port
  • delete Delete files in remote host
  • mdelete [remote-files] Delete a batch of files
  • mkdir directory-name Create a directory in the remote host
  • rename [from] [to] Change the file name in the remote host
  • rmdir directory-name Delete a directory in a remote host
  • status Show current FTP status
  • system Display remote host system type
  • user user-name [password] [account] Re-login to the remote host with another username
  • open host [port] Re-establish a new connection
  • prompt Interactive prompt mode
  • macdef Define Macro Command
  • lcd Change the working directory of the current local host, if default, go to the current user's HOME directory
  • chmod Change the file permissions of the remote host
  • case When ON, the file name copied with the MGET command is transferred to the local machine, all converted to lowercase
  • cd remote-dir Enter the remote host directory
  • cdup Go to the parent directory of the remote host directory
  • ! Execute an interactive shell on the local machine and exit to the ftp environment, such as! Ls * .zip

MYSQL command

mysql -h host address -u username -p password to connect MYSQL; if MYSQL is just installed, the super user root has no password. (Example: mysql -h110.110.110.110 -Uroot -P123456
Note: u and root can be used without adding spaces, the same is true for others)

  • exit Exit MYSQL
  • mysqladmin -u用户名 -p旧密码 password 新密码 change Password
  • grant select on 数据库.* to 用户名@登录主机 identified by "密码";Add new users. (Note: Unlike the above, the following are commands in the MYSQL environment, so they are followed by a semicolon as the command end character)
  • show databases;The database list is displayed. At the beginning, there were only two databases: mysql and test. The mysql library is very important. It contains MYSQL system information. We change the password and add users. In fact, we use this library to operate.
  • use mysql;
  • show tables; Display the data table in the library
  • describe 表名; Display the structure of the data table
  • create database 库名; Build a library
  • use 库名;
  • create table 表名 (字段设定列表); Build table
  • drop database 库名;
  • drop table 表名; Delete library and delete table
  • delete from 表名; Clear records in the table
  • select * from 表名; Show records in table
  • mysqldump --opt school>school.bbb 备份数据库:(The command is executed under the DOS mysqlin directory); Note: Back up the database school to the school.bbb file. School.bbb is a text file, and the file name is arbitrary. Open to see if you will find new discoveries.

This article from the network, after finishing more suitable for reading and publishing, content from: https://www.cnblogs.com/accumulater/p/7110811.html

Published 147 original articles · praised 49 · 160,000 views +

Guess you like

Origin blog.csdn.net/bigbear00007/article/details/105611932