Command Prompt is the default Windows command translation process and is often called CMD. The first version of CMD was developed by Therese Stowell for Windows NT. The maximum length of the chain can be used in the command prompt is 8191 characters for Windows XP or more and 2047 characters for previous versions such as Windows 2000 and Windows NT 4.0, etc. Anonyviet introduces you good tips with CMD that you do not know.
Join the channel Telegram belong to Anonyviet 👉 Link 👈 |
In this article, Anonyviet introduces some important commands of Windows CMD that can definitely help increase your performance and productivity when working on Command Prompt. Check out some tips and tricks along with those commands.
Also you can see some Funny tricks with CMD.
16 commands and tricks with CMD on Windows
Shortcuts on CMD
Remember the shortcuts will help your productivity increase. So CMD has some shortcuts to help you manipulate the command quickly that you need to know:
- Automatic folder name: [ Tab ]
- Repeat the final command: [ Mũi tên lên hoặc F3 ]
- Automatically entered the order to be finally executed by the character: [ Mũi tên phải ]
- Display the history of executing commands: [ F7 ]
- Delete the content of the current line: [ Escape ]
- Ignore the current line you are importing or command being executed: [ Ctrl + C ]
- Delete the word on the left of the insert point: [ Ctrl + Backspace ]
Open CMD with the current folder
The command moves to the current folder on CMD cd đường-dẫn-cần-đến
. However, if you are in the subfolder and the path is quite long. Please open that folder Windows Explorer and on the bar in the command. CMD then press Enter.
At that time, the CMD window will be opened and the current path will be the open folder of Windows Explorer.
Create a safety directory – inviolable
If you want others to disturb your data, you can Create a safe folder With the help of this command. The folder is created by this command Can not copy or move Go to another position or be deleted by anyone. Run CMD where you want to create folders and execute the command below.
- To create folders:
md Aux\
This command will create a security folder called AUX ” - To delete folders:
rd Aux\
This command will delete the folder created by the above command, make sure the drum folder when you delete, otherwise the system will not allow deletion of the folder by command ”
Hide folder
If you have some secret data and do not want to share with anyone, this command will be very helpful. You can hide the folder with the help of this command and no one can view it unless you abandon it. The hidden folder will not display even when turning off the option “Hidden Items”Options – Views.
- To hide folders:
attrib +h +s +r Tên-thư-mục-cần-ẩn
For example: [attrib +h +s +r D:\AnonyViet] - To remove the folder:
attrib –h –s –r Tên-thư-mục-cần-bỏ-ẩn
CMD command to turn off, restart, logoff
If you want to turn off the computer, restart and log out with the machine with the following commands will help you do that.
- Restart or turn off the computer with the interface window: [ shutdown /i ]
- Place the device in Hibernate mode immediately: [ shutdown /h ]
- Completely turn off the computer: [ shutdown /p ]
- Log out from the current account: [ shutdown /l ]
- Turn off the computer: [ shutdown /s ]
- Turn off the device in the designated timer: [ shutdown /s /t xx ] (XX is the time in seconds)
- Cancel strange boot /turn off the machine in the waiting period: [ shutdown /a ]
- Restart with advanced boot options: [ shutdown /r /o ]
- Showing notifications before Shutdown/Restart: [ shutdown / c “Nội dung Thông báo” ]
Customize the size, color, size in CMD
If you are bored with black and white CMD windows, this is a good news for you, you can customize it with the help of the commands. You can change the title, the name of the prompt, the color and the background color of the CMD with the following commands.
- To change the title of CMD: for example
title tên-tiêu-đề
, For example: Title anonyviet - To change the name of the prompt waiting:
prompt tên-cần-đổi:
, For example: [prompt AnonyViet:] - To change the background color and font: [
Color mã-màu
] For example: [Color 03] (Type color /? To view the color code list)
If you want to change the font, font color, font size … you have to right click on the title bar, choose Properties, Then there will be a separate option window.
Create hotspot wifi to share connection
If your computer is connecting wifi, you can use your computer to create a wifi access point for other devices. How to do as follows:
- Create Hotspot:
netsh wlan set hostednetwork mode=allow SSID=WIFI-Name Key=Password of Wi-Fi
. (Password must be from 8 characters or more).
For example: netsh wlan set hostednetwork mode=allow SSID=AnonyViet Key=123456789
- Hotspot boot: [netsh wlan start hostednetwork]
- Turn off Hotspot: [netsh wlan stop hostednetwork]
Delete old commands, clean CMD screen
If there are too many content on the CMD screen, you want to delete to enter other statements for easy management. Please use the command cls
. Immediately CMD screen will return to black and no words.
List of programs installed on Windows
You can get a full list of programs installed on your computer by typing a simple command. The time to find the list of programs will completely depend on the number of programs installed in the machine.
- To receive the list of installed applications:
wmic product get name
List of current folders
If you want to see how many sub -folders, files and dates inside the current folder … use the command dir
.
- To get the folder list:
dir
- To get the listed folder list:
dir /b | sort
- To list the listed folders and files arranged with the latest modified date and time:
dir /s | sort
- To get a list of files arranged with a complete file link:
dir /b /s |
sort
Export the result to the file
type > log.txt
After each statement, you will save the results to the log.txt file.
For example we have orders dir
is the current folder listing command. Now we type dir > log.txt
. Then CMD will create a file name log.txt and the content will contain the name of the director listed by Dir.
If you want to list the Vietnamese accent folder you use the command below:
chcp 65001 dir /b > log.txt
(/b only list name)
See IP address, network information
- View computer name:
hostname
- See IP:
ipconfig
- View network information details:
ipconfg /all
- See MAC address:
getmac
Check the quality of sugar on the internet, find the website IP
Command ping
is the smooth inspection command of the network transmission line.
To find the IP of a website, type the command ping địa-chỉ-website
. For example: ping anonyviet.com
If not encountered an error Request time out Then the network of your home connect with anonyviet.com is quite good. Index time The faster the connection is.
List the processes running on Windows
This is one of the best commands if you want to get a full list of tasks running on your computer. The command will provide a list of all running processes with full details such as the task name, the name of the session, the number of sessions, the status of using memory and the username started the task.
- To get the list of running tasks:
tasklist
- To receive detailed lists of running tasks:
tasklist /v
Execute multiple commands at the same time on one line
We can execute multiple commands in a command line using the command separation && And the commands will take turns in the sequence they are written in it.
To execute multiple commands in a line: [ CommandA && CommandB && CommandC
] .
For example: Ping anonyviet.com && Color 03 && dir
This command will Ping IP of Anonyviet, change the background color and make a list of folders.