SoFunction
Updated on 2025-04-07

DOS Command Dictionary 2 Page 1/2

net use \\ip\ipc$ " " /user:" " " Create an IPC empty link
net use \\ip\ipc$ "Password"/user:"Username" Create IPC non-empty link
net use h: \\ip\c$ "Password"/user:"Username" Map the other party C after logging in: Go to the local area as H:
net use h: \\ip\c$ Map the other party C after logging in: Go to the local area as H:
net use \\ip\ipc$ /del Delete the IPC link
net use h: /del Delete the mapping of the other party to the local H:
net user user password/add create a user
net user guest /active:yes Activate the guest user
net user Check which users are there
net user account name View the properties of the account
net localgroup administrators username /add Add “user” to the administrator so that it has administrator privileges. Note: add s and use plural numbers after administrator
net start View which services are enabled net localgroup administrators username /add
net start Service name Start the service; (such as: net start telnet, net start schedule)
net stop Service name Stop a certain service
net time \\Target ip View the other party’s time
net time \\Target ip /set Set the local computer time synchronization with the time of the "Target IP" host, and add parameters/yes to cancel the confirmation information
net view View what sharing is enabled in the local LAN
net view \\ip View what sharing is enabled in the other party’s LAN
net config display system network settings
net logoff disconnected sharing
net pause Service Name Suspend a certain service
net send ip "Text information" Send a message to the other party
net ver The type and information of network connections being used in the LAN
net share view locally enabled shares
net share ipc$ Open ipc$share
net share ipc$ /del Delete ipc$share
net share c$ /del Delete C: Share
net user guest 12345 After logging in with the guest user, change the password to 12345
net password Password Change the system login password
netstat -a Check which ports are opened, commonly used netstat -an
netstat -n View the network connection status of the port, commonly used netstat -an
netstat -v View ongoing work
netstat -p Protocol Name Example: netstat -p tcq/ip View the usage of a certain protocol (View the usage of tcp/ip)
netstat -s View all protocol usage in use
nbtstat -A ip If one of the ports 136 to 139 is opened, you can view the username that the other party has recently logged in (the username before 03) - Note: Parameters - A must be capitalized
tracert -parameter ip (or computer name) tracking route (packet), parameter: "-w number" is used to set the timeout interval.
ping ip (or domain name) sends data with a default size of 32 bytes to the other host. Parameters: "-l[space] packet size"; "-n number of data sent"; "-t" refers to ping all the time.
ping -t -l 65550 ip Ping of death (sending files greater than 64K and pinging them all the time becomes ping of death)
ipconfig (winipcfg) is used to view the local IP address in Windows NT and XP (winipe 95 98). ipconfig can display all configuration information with the parameter “/all”.
tlist -t Displays the process in a tree line list (it is an additional tool for the system, and it is not installed by default, in the Support/tools folder of the installation directory)
kill -F Process name F parameter is added and forced to end a process (it is an additional tool for the system, and it is not installed by default, in the Support/tools folder of the installation directory)
del -F File name After adding the -F parameter, read-only files can be deleted. /AR, /AH, /AS, /AAA means deleting read-only, hidden, system, and archive files respectively. /A-R, /A-H, /A-S, /A-A means deleting files other than read-only, hidden, system, and archive files. For example, "DEL/AR *.*" means deleting all read-only files in the current directory, and "DEL/A-S*.*" means deleting all files in the current directory except system files
#2 2:
del /S /Q Dir or use: rmdir /s /Q Dir /S to delete the directory and all subdirectories and files under the directory. Use parameters/Q at the same time to cancel the deletion operation and delete it directly when the system confirms. (The two commands have the same function)
move Disk letter\path\file name to be moved The path to store the moving file\file name after moving The file is moved, use the parameter/y to cancel the prompt to confirm that the same file exists in the mobile directory and directly overwrite it
fc   >  Compare the two files and output the differences to the file. "> " and "> >" are redirect commands
at id number Activate a registered planned task
at/delete Stop all planned tasks, and use parameters /yes to stop directly without confirmation
at id number/delete Stop a registered planned task
at View all planned tasks
at \\ip time Program name (or a command) /r Run a program on the other party at a certain time and restart the computer
finger username @host View what users have logged in recently
telnet ip port All wind login server, default port is 23
open ip connect to IP (command after login of telnet)
telnet. Type telnet directly on the machine. It will enter the telnet of the machine.
copy Path\File name 1 Path\File name 2/y Copy file 1 to the specified directory as file 2. Use parameter /y to cancel the confirmation that you want to rewrite an existing directory file.
copy c:\ \\ip\admin$ Copy local c:\ to the other party’s admin
cppy/b+/a  hide the content into it to generate a new file. Note: The file header must be empty in three rows. Parameters: /b refers to a binary file, /a refers to an ASCLL format file.
copy \\ip\admin$\ c:\ or:copy\\ip\admin$\*.* Copy the files (all files) shared by the other party’s admin$ to local C:
xcopy File or directory tree to be copied Destination address\directory name Copy the file and directory tree, and use parameters/Y to overwrite the same file without prompting
tftp -i Own IP (using meat machine IP when using meat machine as a springboard) get  c:\ After logging in, download the “IP” to the target host c:\ Parameters: -i means to transmit in binary mode, if you use it when transferring exe files, if not adding -i, it will be transmitted in ASCII mode (transfer text file mode)
tftp -i Other IP put c:\ After logging in, upload local c:\ to the host
ftp ip port is 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); default is ASCII format (when text file)
route print displays the IP route, which will mainly display the network address Network addres, subnet mask Netmask, gateway address Gateway addres, interface address Interface
arp View and process ARP cache. ARP means name resolution and is responsible for parsing an IP into a physical MAC address. arp-a will display all information
start Program name or command /max or/min Open a new window and maximize (minimize) to run a program or command
mem check CPU usage
attrib file name (directory name) View the properties of a file (directory)
attrib File name -A -R -S -H  or +A +R +S +H Remove (add) the archive of a file, read-only, system, hidden attributes; use + to add it as a certain attribute
dir View file, parameters: /Q displays which user of the file and directory belong to the system, /T:C displays the file creation time, /T:A displays the last time the file was accessed, /T:W last time the date /t , time /t Use this parameter, namely "DATE/T" and "TIME/T" will only display the current date and time, without having to enter a new date and time
set Specify the environment variable name = Characters to be assigned to the variable Set the environment variable
set displays all current environment variables
set p (or other characters) displays all environment variables currently starting with character p (or other characters)
pause pause the batch process and displays: Please press any key to continue...
if execute conditional processing in the batch program (see if command and variable for more instructions)
goto tags are directed to rows with tags in the batch program (the tags must be a separate line and are headed with a colon, such as: ":start" tag)
call Path\batch file name Calling another batch program from the batch program (see call /? for more instructions)
for Execute a specific command on each file in a set of files (see for commands and variables for more details)
echo on or off to turn echo on or off. Use echo only without adding parameters to display the current echo settings.
echo information displays information on the screen
echo information >> Save "information" to file
findstr "Hello"  Looking for string hello in file
find file name find a file
title title name change CMD window title name
color Color value Set the foreground and background color 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=liquid, E=light yellow, F=bright white
prompt name changed display command prompt (change C:\, D:\ to: EntSky\ )
#3 Three:
ver Display version information in the DOS window
Winver pops up a window to display version information (memory size, system version, patch version, computer name)
format Disk letter /FS: Type Format disk, type: FAT, FAT32, NTFS, Example: Format D: /FS:NTFS
md Directory name Create directory
replace source file directory to replace file replacement file replacement file
ren Original file name New file name Rename file name
tree displays the directory in a tree structure, and use parameter -f to list the file name in the first folder
type file name displays the content of the text file
more File name Display output files screen by screen
doskey The command to be locked = character
doskey To unlock command = The lock command provided for DOS (edit the command line, call the win2k command again, and create the macro). For example: lock dir command: doskey dir=entsky (doskey dir=dir cannot be used); unlock: doskey dir=
taskmgr call up the task manager
chkdsk /F D: Check disk D and display status report; add parameters/f and fix errors on disk
tlntadmn telnt service admn. Type tlntadmn to select 3, then select 8, and you can change the default port 23 of the telnet service to any other port
exit exit or currently, using parameter /B is to exit the current batch script instead of
path path\file name of the executable file Set a path for the executable file.
cmd starts a win2K command explanation window. Parameters: /eff, /en Close and enable command extensions; see cmd/ for more details if I have a detailed description.
regedit /s registration file name Import the registry; parameter/S refers to importing in quiet mode without any prompts;
regedit/e registration file name export registry
cacls file name parameter display or modify file access control list (ACL) - when targeting NTFS format. Parameters: /D User name: Set to deny access by a certain user; /P User name: perm Replace access by a specified user; /G User name: perm Give access by a specified user; Perm can be: N None, R Read, W Write, C Change (write), F full control; Example: cacls D:\ /D pub Set d:\\        pub Set d:\\                                                                                                                                                                               �
cacls file name view file access user permission list
REM Text content Add annotations to batch file
netsh View or change the local network configuration status
#4 Four:
IIS Service Commands:
iisreset /reboot Restart win2k computer (but there is a prompt that the system will restart information appears)
iisreset /start or stop Start (stop) all Internet services
iisreset/restart Stop and restart all Internet services
iisreset/status Display all Internet service status
iisreset /enable or disable Enable (disable) reboot of Internet services on the local system
iisreset /rebootonerror When starting, stopping or restarting the Internet service, it will restart if an error occurs
iisreset /noforce If the Internet service cannot be stopped, the Internet service will not be terminated forcibly
iisreset /timeout Val has not stopped Internet service when it reaches the time of time (seconds). If the /rebootonerror parameter is specified, the computer will restart. The preset value is to restart for 20 seconds, stop for 60 seconds, and restart for 0 seconds.
FTP command: (There are detailed descriptions later)
The command line format of ftp is:
ftp -v -d -i -n -g[host name] -v Show all response information of the remote server.
-d Use debugging method.
-n Restrict the automatic login of ftp, that is, do not use .netrc files.
-g Cancel the global file name.
help [Command]  or ? [Command] View command instructions
bye or quit terminate the host FTP process and exit the FTP management method.
pwd lists the current remote host directory
put  or send local file name [file name uploaded to host] Transfer a local file to the remote host
get  or recv [Remote host file name][File name after downloading to local] Transfer from the remote host to local host
mget [remote-files] Receive a batch of files from the remote host to the local host
put local-files Transfer a batch of files from the local host to the remote host
dir or ls [remote-directory] [local-file] Lists the files in the current remote host directory. If there is a local file, write the result to the local file
ascii sets the file transfer in ASCII mode (default value)
bin  or image set to transfer files in binary
bell: Alarm prompts every time a file is transferred
cdup returns to the previous directory
close interrupts the ftp session with the remote server (corresponding to open)
open host[port] Create a specified ftp server connection, and specify the connection port
delete Delete files in the remote host
mdelete [remote-files] Delete a batch of files
mkdir directory-name Create directory in remote host
rename [from] [to] Change the file name in the remote host
rmdir directory-name Delete directory in remote host
status displays the current FTP status
system displays the 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 defines macro command
lcd Change the working directory of the current local host. If default, go to the HOME directory of the current user.
chmod changes file permissions on remote hosts
case When ON, use the MGET command to copy the file name to the local machine and convert all into lowercase letters.
cd remote-dir Enter the remote host directory
cdup Enter the parent directory of the remote host directory
! Execute interactive shell in the local machine, exit back to the ftp environment, such as !ls*.zip
#5 5:
MYSQL command:
mysql -h host address -u username -p password Connect to MYSQL; if MYSQL has just been installed, the super user root does not have a password.
(Example: mysql -h110.110.110.110 -Uroot -P123456
Note: You can do not need to add spaces to u and root, and the same is true for others)
exit exit MYSQL
mysqladmin -u Username -p Old password Password New password Modify password
grant select on database.* to username@login host identified by \"Password\"; add new users. (Note: Unlike the above, the following is a command in the MYSQL environment, so it is followed by a semicolon as the command ending character)
show databases; Show the database list. There were only two databases at the beginning: mysql and test. The mysql library is very important. It contains the system information of MYSQL. We change the password and add new users, but in fact we use this library to operate.
use mysql;
show tables; Show tables in the library
describe Table name; Display the structure of the data table
create database store store name;
use library name;
create table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table table
drop database store store name;
drop table table table name; deletion of library and deletion of table
delete from Table name; Clear the records in the table
select * from Table name; Show records in the table
mysqldump --opt school> Back up the database: (The command is executed in the \\mysql\\bin directory of DOS); Note: Back up the database school to a file. It is a text file with the file name available. Open it and you will find new discoveries.
New commands (practical part) added to win2003 system:
shutdown /parameters shut down or restart the local or remote host.
Parameter description: /S Switch off the host, /R Restart the host, /T digitally set the delay time, the range is between 0 and 180 seconds, /A cancels the power on, /M //IP Specified remote host.
Example: shutdown /r /t 0 Restart the local host immediately (no delay)
taskill /parameters process name or process pid terminate one or more tasks and processes.
Parameter description: /PID The pid of the process to be terminated. You can use the tasklist command to obtain the pid of each process, /IM The process name of the process to be terminated, /F forced to terminate the process, /T terminate the specified process and the child process it started.
tasklist displays the process identifier (PID) of processes, services, and services currently running on local and remote hosts.
Parameter description: /M lists the dll file loaded by the current process, /SVC shows the corresponding services for each process. When there are no parameters, only the current process is listed.
#6 Six:
Basic commands for Linux systems: Case sensitivity
uname displays version information (same as win2K ver)
dir shows the current directory file, ls-al shows the included hidden files (dir of win2K)
pwd query the current directory location
cd cd ..Return to the previous level directory, pay attention to the space between cd  and... cd /Return to the root directory.
cat file name view file content
cat > Write content into the file.
more File name Displays a text file in a page-by-page manner.
CP Copy file
mv move file
rm file name delete file, rm -a directory name delete directory and subdirectories
mkdir directory name creation directory
rmdir Delete the subdirectory, there is no document in the directory.
chmod Sets access permissions for files or directories
grep Find strings in archive
diff archive file comparison
find file search
date Current date, time
who query the person currently using the same machine as you and the time and location of Login
w Query the detailed information of the current boarder
Whoami Check your account name
groups Check someone's group
passwd Change password
history Check the commands you have given
ps Show process status
kill Stop a process
gcc hackers usually use it to compile files written in C language
su permissions converted to specified user
telnet IP telnet connects to the other host (same as win2K). When bash$ appears, it means that the connection is successful.
ftp ftp connects to a server (same as win2K)
12Next pageRead the full text