windows 10 commands

There are essentially two ways in which you can interact with a Windows 10 computer: namely, Command-line Interface (CLI) and Graphical User Interface (GUI). While the GUI provides an easy-to-use interface for interacting with a computer via buttons and menus, the CLI requires you to enter text commands using the keyboard. Most Windows 10 users prefer to use the graphical interface. However, the command-line is a very powerful tool and it's faster in most cases.

In this tutorial, you will learn about the top 20 useful Windows 10 commands you should know.

netTo manage network and its settings
findstrTo search for strings in files
shutdownTo shutdown and restart computer
ipconfigTo find computer's IP address
robocopyRobust file copying program like Unix rsync
timedate.cplOpens the Date and Time window
mkdirTo create a directory
cdTo navigate or change directory
dirTo list files and directories
moveTo move one or more files from one directory to another directory
rdTo remove (or delete) a directory
copyTo copy one or more files from one directory to another directory
chkdskTo check your computer’s drive for file system errors
sfcTo check for and restore corrupted windows system files
rstruiTo launch the system restore wizard
SystemPropertiesProtectionTo open the system protection panel
winverTo display information about the version of Windows
msconfigTo open  configuration panel to configure Windows startup and boot settings etc
wmic bios getTo retrieve BIOS information
slmgr /dliTo display license information of Windows

1. net

The net family of commands are used for performing various network-related operations. There are many net commands available, but this article focuses on the most used ones.

net start – Displays a list of Windows services that are started on your computer. This is a quick way to view only the services that are currently running.

net stop – Stops a Windows service. The syntax of the command is net stop Service Name where Service Name is the name of a running service.

net user – Lists all accounts on your Windows computer, including system and built-in accounts. You can also create or delete a user with net user username /add or net user username /delete respectively.

net use – To map a network drive. The basic syntax of the command is net use \\Path.

net accounts – For quickly viewing and configuring account policies and password policies on the computer.

net share – To display all resources on your Windows computer that are shared with other users.

net /? – To list other available net command options.

2. findstr

The findstr command is another powerful tool that you can use to find strings within text files. Let's say that you have a folder named folder4 containing a lot of text files on your C: drive, and you need to quickly find all files that contain a specific term 'Sample'.

findstr /i /s sample c:\folder4\*

findstr command
findstr command

3. shutdown

The shutdown command can be used to either shutdown or reboot your Windows computer. The action can be executed immediately or after a specified period. For example, shutdown /s /t 120 will shut down the computer in 120 seconds (i.e. 2 mins).

You can also enter the following commands.

shutdown /s /t 0 – To immediately power down your machine.
shutdown /r /t 0 – To immediately reboot your machine.
shutdown /a – To abort any scheduled shutdown or reboot of the Windows computer. This helps when you have a force windows updates and you need to stop the computer from rebooting.

shutdown command

4. ipconfig

The ipconfig command displays IP configuration details of your Windows computer. You can view details like IP address, subnet mask and default gateway. To view additional details such as MAC address, use ipconfig /all.

ipconfig
ipconfig command

Other options include:

ipconfig /release – To give up your computer’s IP address.
ipconfig /renew – To request for an IP address again.

5. robocopy

Robocopy is a robust tool for copying files in Windows. The syntax of the command is robocopy source destination.

robocopy command
robocopy

6. timedate.cpl

The timedate.cpl command opens the Date and Time window where you can easily change your computer’s date, time and time zone settings. You can also add additional clocks to display the time in another time zone.

timedate
timedate command

7. mkdir

The mkdir (short for Make Directory) command is used to create directories or folders. This command is very useful when you need to quickly create multiple folders or nested folders.

For example, mkdir c:\folder4\folder5\folder6 will create folder4 and all subfolders on the C: drive.

mkdir command
mkdir - create directory

Alternatively, you can use the md command to create a single folder. The syntax is md foldername.

8. cd

The cd command is used to change directory. The syntax of the command is cd DirectoryPath.

cd command
Change folder to 'c:\folder1'

9. dir

The dir command displays the content of a specified directory. If you don’t specify a directory, dir alone will display the content of the directory that you are currently in.

dir command
Listing contents of directory named 'Folder1'

10. move

The move command is used to move files, as well as to rename files and folders.

To move a file:

move SourceFilePath DestinationPath

To rename a folder:
move FolderName NewName

move command
Move file named 'folder1_text.txt' to directory 'c:\folder2'

11. rd

The rd command deletes a folder. The basic syntax is rd FolderName. If the folder is not empty, you should use key /s.

Alternatively, the rmdir command can be used to delete a folder.

rd command
Delete 'folder2' including all files and subfolders

12. copy

The copy command is used to copy one or more files to a different location. The basic syntax of the command is copy SourceFilePath DestinationPath.

copy command
Copy file named 'test1.txt' to directory named 'folder3'

The xcopy command can also be used to copy files and folder trees.

13. chkdsk

The chkdsk (short for Check Disk) command is used to check your computer’s drive for file system errors. This is a very handy utility that could help you fix strange problems when you try to open, delete, rename or save files on your computer. This command requires administrative privileges to run.

The most common way to use this utility is by entering chkdsk /r. You can enter chkdsk /? to view other available options.

chkdsk command
chkdsk /r

14. sfc

System File Checker (sfc) is a utility that you can use to check for and restore corrupted Windows system files. When you notice that some Windows functions do not work as expected, or Windows crashes intermittently, simply enter sfc /scannow in the Command Prompt.

You must be an administrator in order to run this command.

sfc command
sfc /scannow command

15. rstrui

The rstrui command is used to launch the System Restore wizard. When your Windows computer starts to misbehave suddenly, you can use the System Restore utility to restore your computer to a previous point in time.

rstrui command
rstrui command

16. SystemPropertiesProtection

SystemPropertiesProtection is used to open the System Protection panel. You can view and configure system restore settings from here. This is also where you can manually create a restore point as a precaution before installing a driver or an app.

SystemPropertiesProtection

17. winver

The winver command is used to display information about the version of Windows that is running on your computer, including the OS build.

winver command

18. msconfig

The msconfig command opens a configuration panel where you can quickly configure Windows startup and boot settings. You can also view and manage all Windows services from here.

msconfig command

19. wmic bios get

The wmic bios get command is useful for retrieving BIOS information without having to boot your computer into the system bios mode. For example, you can run wmic bios get serialnumber to display the serial number of your computer.

You can view other available options with wmic bios get /?.

WMIC

20. slmgr /dli

The slmgr /dli command can be used to display license information for your Windows computer, including partial product key and license status.

slmgr command

Conclusion

The command-line interface is indeed a fast and powerful way to control your Windows computer. You just need to know the right commands to use. We hope that you find the above Windows commands very useful.