Some CMD commands used in Windows
Command Prompt has long been a feature that greatly supports system exploitation on Windows devices, including Windows VPS. Let’s learn with Dainty some CMD commands used in Windows to help you work more conveniently.
What is Command Prompt?
Command Prompt (CMD) is a command input program that helps users perform tasks through corresponding commands for the Windows operating system. CMD has a simple and friendly interface, with a text input interface with a black background and a classic, familiar white font.
Command Prompt Functions
The main function of Command Prompt is to bridge the communication between users and the Windows system by using commands. Thanks to that, you can perform operations such as creating, renaming, moving, copying and deleting folders, displaying system information, checking and fixing system errors, etc.
Some CMD commands used in Windows
If you are a Windows user, then the common operations certainly allow you to comfortably interact with the system. However, some of the commands below will help you operate more deeply with Command Prompt.
Before entering the command, open the screen to operate with cmd commands, as follows:
– Press the Windows + R key combination to open the Run dialog box
– Type “cmd” in the Open box => Click OK, then enter the commands according to your usage needs.
-
Dir command: Display files and folders
Short for directory, the dir command is used to list the exact files and folders on the computer.
How to use the dir command in Command Prompt depends on your needs, including:
– To display a list of current files and folders, type dir
and press Enter.
– To display a list of files and folders in a specific folder, type the following syntax: dir + [path to folder]
Example: dir C:\Program Files
– To filter files and folders by any criteria, type dir + [criteria]
. Including:
/a
: Display a list of hidden files and folders./b
: Display a list of files and folders without additional information./s
: Display a list of files and folders in a tree view.* [file format]
: Display a list of files with the corresponding file format./d or /w
: Display a list of files and folders horizontally.
There are also some advanced command types that help you optimize the display of files and folders.
-
cd command: Move files and folders
CD stands for change directory, the cd command will help you change the path to the selected folder or file, or in other words, you will move that data to another place. The ways to use the cd command in Command Prompt are as follows.
– To see which folder is open at which path, type cd
and press Enter.
– To move a file to a subfolder, use the syntax
cd [subfolder name]
Example: cd Dainty
– To move a file or folder to the parent folder, type cd
and a colon: cd ..
– To move a file or folder to any folder, type: cd [path to folder]
Example: cd C:\Program Files\Dainty
-
mkdir command: Create a new folder
With the mkdir command, you can create a folder with a simple command as follows:
– To create a folder at the current location, you enter the command: mkdir [folder name]
– To create a folder at a specific location, you enter the command: mkdir [path to folder]
– Create multiple folders at the same time, you enter the syntax:
mkdir [1st folder name] [2nd folder name] [3rd folder name]
Example: mkdir VPSDainty DaintyCloud
-
touch command: Create a new file
Not only creating a folder, you can also create a file with the desired format using Command Prompt.
– To create a file, any file, you enter the command: touch [file name.format]
Example: touch Dainty.txt
– To create multiple files at the same time, you enter the following syntax.
touch [file name 1.format] [file name 2.format] [file name 3.format]
Example: touch Dainty.txt VPSWindows.css DaintyCloud.html
-
Del command: Delete files, folders
Along with that, the feature of deleting folders using the del command is indispensable
– To delete any file, you enter the command: del [file name.format]
Example: del Dainty.txt
– To delete multiple files at the same time, you enter the command according to the syntax:
del [filename 1.format] [filename 2.format] [filename 3.format]
Example: del Dainty.txt vps.xlsx vpswin.ppt
– To delete a file in any location, enter the command: del [file path]
Example: del C:\Program Files\Dainty\Logo.img
– To delete all files and contents in a folder, use the syntax: del /s /q [folder name]
-
Copy command: Copy files to a folder
As the name of the command is copy, the command line will help you copy files to the specified folder. To use the copy command in Command Prompt, do the following:
– To copy files to any folder, enter the syntax: copy “filename.format” “path to destination folder”
Example: copy “Dainty.txt” “C:\Program Files”
– Similarly, to copy multiple files at the same time to the destination folder, you enter the following syntax and press Enter.
copy "1st folder name.format" "2nd folder name.format" "path to destination folder"
-
ipconfig command: Display IP configuration information of the device
Not only applicable to simple operations, Command Prompt also helps you look up advanced information such as IP information of the device with the ipconfig command. You just need to enter ipconfig
and press Enter, the IP configuration information of the device will be displayed.
-
ping command: Check network connection to IP address or server
Continuing with the issue related to the Internet, Command Prompt provides users with the ability to check network connection to an IP address or server through the ping command.
– To check network connection to an IP address or server, you follow the syntax and press Enter:
ping [IP address/host address]
For example: ping 8.8.8.8 or ping google.com
-
netstat
: Check the connections in and out of the device
"help netstat"
to learn more
-
Shutdown: Shut down or restart the computer:
shutdown -s -t [a]
: shutdown.shutdown -r -t [a]
: start the computer.
Where a is the time in seconds.
-
tasklist
: Display running processes -
systeminfo
: Display system information -
chkdsk
(check disk): check the hard drive -
Help command: Display how to use commands.
There are many cmd commands in Windows that Dainty cannot list in this article, you can learn more about how to use commands with the syntax: help <command name>
Above are some CMD commands used in Windows. If you have any questions about Windows VPS, please contact us for advice and free account registration.