10 tips for using Command Line Windows 10 users should know

You can use the cmd command to perform some tasks that normally only use mouse, drag and click. The cmd command is also quite useful when you need to create scripts and automated tasks.

When the graphical user interface (GUI) has made a huge step forward in the past 20 years, you can say that I have no reason to study, using the command line interface. But if you know some of these command line tips, you can help yourself to get rid of some unpleasant situations, when you can't manipulate the regular graphical interface.

  1. Summary of the common Run CMD commands
  2. Use the CMD command to remove viruses on Windows computers

The command line interface provides all the same utilities as the GUI, in fact, this is also the way users use computers for years. Many people who are familiar with the command line also feel comfortable using it and prefer it to the GUI. Also, using the command line looks more "PRO", right? If you think so, here are some cmd commands you need to know, it not only helps you in the necessary cases but can also help you gain respect from your friends because of your "PRO" level. .

The cmd commands on Windows 10 you should know

The cmd command line is like Alice in Wonderland, it gives a sense of mystery, mystery and (possibly) quite dangerous. Our use of computers has changed a lot since the GUI, and for many people, the command line brings an ancient, primitive feel. But do not do so without exploring the command line, a small corner full of fun on Windows. After this article, you can use the command line to perform some tasks that normally only use mouse, drag and click. The cmd command is also quite useful when you need to create scripts and automated tasks.

Before starting, make sure you know how to open CMD on Windows 10, if not, read this article: 12 ways to open CMD - Command Prompt easily on Windows 10. Some commands in the forum require Admin rights To do so, please log in to your computer with Admin permission so that there will be no errors during the trial, execute the command.

1. List the contents of folders and delete the screen

When you want to see what is in this folder, open cmd, enter the command dir (short for directory), press Enter . The list of directory contents will be displayed, which may include files or subdirectories.

Picture 1 of 10 tips for using Command Line Windows 10 users should know

Depending on the folder, a lot of information can be displayed on the screen. When you want to return to the blank screen, type cls to clear the screen.

Picture 2 of 10 tips for using Command Line Windows 10 users should know

2. Turn off, restart, or switch the device to hibernation

This is what we do every day: shutdown, restart, sleep or hibernate the device. When opening cmd, enter shutdown -s -t 01 to immediately shutdown. You can change the timer to stop the timer. For example, if you are downloading a file and you know it will be completed in about 2 hours, just change the time (after -t number, in seconds), the command will now be shutdown -s - t 7200 . If you want to restart the computer, enter the command shutdown -r -t 01 .

Picture 3 of 10 tips for using Command Line Windows 10 users should know

Hibernate is a bit more complicated, at the command prompt, type: rundll32.exe PowrProf.dll, SetSuspendState .

Sleep uses a similar command, but when hibernate mode is turned on, this command doesn't work very well. Therefore, you need to turn off hibernate before running it. To turn off hibernate, type powercfg -hibernate off at the command prompt, and then run rundll32.exe powrprof.dll, SetSuspendState 0.1,0 to put it into sleep.

3. Create user account

You can create user accounts, assign specific permissions for each account. The command to create is as follows:

At the command prompt, enter: net user John mypassword123 / add

Picture 4 of 10 tips for using Command Line Windows 10 users should know

The message appears: 'The command completed successfully'. (The command has been successfully executed). Click Start > select the username you entered to switch to that new account.

If you want to add users to a specific group like Administrator, Power User or Limited User, use this command: net localgroup cap_quyen UserName / add . For example: net localgroup administrators Quantrimang / add .

4. Navigate on file system using CD command (Change Directory)

Navigating and navigating between folders in the GUI is extremely simple when just clicking and clicking. With cmd interface, it is a bit more complicated to move from one folder to another.

When opening cmd with Admin rights, it defaults to the System32 directory. To return to the user directory, you need to do a few steps with the cd command. This will return you to the previous folder, similar to the left arrow in File Explorer.

Picture 5 of 10 tips for using Command Line Windows 10 users should know

When you are in a drive, C: for example, can type cd directory name to open a subdirectory in it. Here, you can also execute the dir command to list the contents of the directory.

More simply, you can directly type the directory path you want to move to cmd. Here, I want to go to the folder named Andre from the current location, type CD C: UsersAndre then Enter . If you want to go back to the System32 directory, just type its path into: CD C: WindowsSystem32 . You can return to the root directory by typing CD .

Picture 6 of 10 tips for using Command Line Windows 10 users should know

5. Create, move, delete folders and files

The md command, short for make directory, will help you create the directory. For example, create the Groovy directory, at the command prompt you enter Groovy md . This command will create a directory at the location you specify. If you want to create a folder somewhere else, use the CD command to navigate to it.

Picture 7 of 10 tips for using Command Line Windows 10 users should know

If you want to create more than one folder in a command entry, just type md followed by the name of each folder with a space in the middle to distinguish it. For example: md Works Files . This command will create two folders, Works and Files, in the same location.

Picture 8 of 10 tips for using Command Line Windows 10 users should know

If you want to move the folder to another location on the drive, use the move command and indicate the path you want to move the folder to. Suppose we will move the newly created Works item to the Sample folder. Enter: move Work d: UsersAndreDocumentsSample .

Picture 9 of 10 tips for using Command Line Windows 10 users should know

Removing folders is also quite easy. To delete the newly created Files folder, at the command prompt, enter rd (remove directory) directory_name, here is rd Files .

Picture 10 of 10 tips for using Command Line Windows 10 users should know

If you delete the file, you use the del command, the syntax: del name_file, for example: del win10uichanges.pptx

Picture 11 of 10 tips for using Command Line Windows 10 users should know

6. Copy, paste, rename files

There are several types of copying commands as follows:

  1. Copy: Use this command when you want to copy files or folders from one location to another
  2. Xcopy: A powerful copy option suitable for copying the contents of a folder with its subfolders into another folder. Xcopy is being replaced by Robocopy with similar functions.

Here are a few examples of how to use these copy commands.

Suppose we now need to copy the PowerPoint file called Evolution of the Settings interface.pptx to the Work folder in Groovy created in section 5. First, change your folder to the location of the file.

Picture 12 of 10 tips for using Command Line Windows 10 users should know

In this case, PowerPoint is in the User folder under Documents. First, type the copy command, followed by the name-file placed in the "", the destination path, for example:

copy 'Evolution of the Settings interface.pptx' c: UsersAndreDocumentsSampleGroovyWork

Picture 13 of 10 tips for using Command Line Windows 10 users should know

Since Robocopy has been used as an alternative to Xcopy, in this article we also focus on this command to keep up with the trend (: D). Robocopy has a number of arguments that you should use when copying multiple directories that require thorough care. Especially useful when creating backups. For example, now that you want to backup the Downloads folder to the Backup folder on USB, here's how to do it:

robocopy 'D: UsersAndreDownloads' 'F: Backup'

Picture 14 of 10 tips for using Command Line Windows 10 users should know

If you want to quickly recover the content of a non-bootable drive, this is one of the fastest and most reliable ways to do it. You can add different arguments for specific results, for example, the / mir command is added to the end of the command to ensure that the permissions on the root directory are maintained in the destination directory.

If a System error cannot be found in the specified file, it may be because the file name is too long. Try renaming the file shorter than watching. To do this, type rename, then the current file name, the new file name, put these names in quotation marks, for example: ren ame ' Evolution of the Settings interface.pptx' ' win10uichanges.pptx'.

Picture 15 of 10 tips for using Command Line Windows 10 users should know

7. Network: IP Config, Ping, Tracert, DNS Flush

The ipconfig command is one of the most common commands you have. It is used to view the IP address of the computer or the network. Finding IP addresses on the GUI is quite simple, but it is faster to use the command line interface. Just type ipconfig or ipconfig / all to see the IP addresses in the network. Can use ipconfig to get the new address. If you're using an enterprise network, this may help resolve network logon problems or access resources, such as maped network drives.

At the command prompt, type ipconfig / release , Enter , type ipconfig / renew and press Enter again.

Ping is used to check the status of a network address, allowing you to determine whether packets are sent and received or not. You can read more about Ping here: What is the PING command on the computer? How does it work?

You can ping any website as long as you have that website address, for example: Ping: quantrimang.com

Picture 16 of 10 tips for using Command Line Windows 10 users should know

Tracert or Trace Route , this article introduces in detail this command, please refer to it: What is the Tracert command? How to apply Tracert effectively?

DNS Flush: DNS converts simple IP addresses like 222.225.28.220 into quantrimang.com. Sometimes you can't resolve an address, then clearing DNS cache can solve the problem, DNS Flush will help you do that, just use the command: ipconfig / flushdns .

8. Browse and mount shared network resources

If you want to access a networked drive or shared folder on the network, you can easily do so via Network and File Explorer in the GUI. When connecting to network resources from the command line, use the net use syntax , then TEN_MAYNETWORKSHARE. In the example below, we need to connect to another computer called ELITEBK-INSIDER. If the network resource is protected by a password, you will be asked to enter the password with the username. After connecting, you will see the message: "The command completed successfully". (The command has been successfully executed.) You can browse the contents of the directory using the same commands as mentioned. on.

Picture 17 of 10 tips for using Command Line Windows 10 users should know

If you want to connect to a specific subdirectory over the network, you can use the pushd command associated with the network path, for example pushd ELITEBK-INSIDERWiki Projects . Quite similar to the directory change command, right?

Picture 18 of 10 tips for using Command Line Windows 10 users should know

9. Start installing an application

The command line interface can also install applications like the GUI, you should try using this command once, especially when having problems installing the app on the GUI. Simply change to the directory where the installation file is located, enter the installation file name with its extension.

Picture 19 of 10 tips for using Command Line Windows 10 users should know

10. DISM and SFC

DISM (Service Deployment and Management Tool) is a tool you can use to diagnose "health" of Windows 10. When encountering problems such as stability or performance of the system, DISM can help to etch dress. At the command mark, type these commands once:

Dism / Online / Cleanup-Image / CheckHealth

Dism / Online / Cleanup-Image / ScanHealth

Dism / Online / Cleanup-Image / RestoreHealth

SFC (System File Check) is a tool to check the file system to see if it is still good, not outdated. This command is often added to DISM to scan and repair corrupted system files. If you find any corrupted files, it will restore the copy of that file from System32. To use, enter sfc / scannow at the command prompt, then press Enter . This process may take a while, depending on the severity of the problem.

See also: Displays CPU information via Command Prompt on Windows 10

What useful command did I miss? Please share the cmd command you are most interested in by leaving a comment below the article!

Update 26 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile