CMD stands for “Command” but in Windows, it is known as Command Prompt. It is a Command-Line Interpreter which is provided by the Microsoft in Windows OS. This command prompt is used to execute the entered commands in the command shell to perform some advanced administrative functions like you can manage your file properties, system properties, user manager, etc. by using command lines So, let’s see what are the basic commands lines that can help you to interact with your operating system(window).
Table of Contents
Basic CMD Commands Line
“systeminfo” is a system information command that helps to show all the information of your system in the terminal. So let’s run this command in the terminal and see what it’ll give us…
As you can see in the given image its shows all the information about my system.
2) date /t
“date /t” is a command that helps you to show the current date. So, let’s try this command in the terminal…
As you can see the date when I was using this command in my system.
3) time /t
It’s exactly the same command as “date /t” command. This command helps you to show the current time of your system. So, let’s try this command in the terminal…
As you can see the current time when I was using the system.
“ver” is a version command line that helps you to show your current version of your system.
As you can see my current version of my system is Windows version 10.0.22000.194.
“dir” is a directory command that helps you to display all the files and folders from your current directory. As you can see in the above image my current directory is C:\Users\ankus. So, let’s try this command to check how many files and folder are there in my current directory (C:\Users\ankus).
As you can see in my current directory (C:\Users\ankus) there are only one file have (CMD Command Line.txt) and 12 folders(Contacts, Desktop, Documents, Downloads, Favourites, Links, Music, OneDrive, Pictures, Saved Games, Searches and Videos)
“cd” is change directory command. It helps you to change your current directory to another directory. As you can see in the “dir” command image there are 12 folders that have. So, let’s try to move into the folder “Downloads”.
To move to the Downloads directory so we have to write “cd Downloads” in the terminal. let’s see…
As you can see we have successfully changed our directory from (C:\Users\ankus) to (C:\Users\ankus\Downloads).
“mkdir” is a command that helps you to create a new directory/folder in your system. So, let’s try this command.
Before trying this command first let’s check how many folders are there in our current directory. let’s check…
In our current directory there are two folders (files and program). So, now let’s create a new directory/folder with the name of “computerstudypoint” by using mkdir command.
To create computerstudypoint directory/folder we have to write “mkdir computerstudypoint” command in the terminal. let’s try it..
As you can see the computerstudypoint directory has been created.
“rmdir” is a remove directory command that is used to remove/delete the directory. Well we recently created a computertstudypoint directory with the help of “mkdir” command. So now let’s try to remove this directory with the help of this command. Let’s remove it…
To remove a computerstudypoint directory so we have to write “rmdir computerstudypoint” command in the terminal. let’s see…
As you can see the computerstudypoint directory has been removed.
9) Creating file commands
As such, there is three-way to create a new file.
i. By using “type” Command
Well, the “type” command is used to display the content of the text file in the terminal. But it is also used for creating empty files. The command for creating files is “type nul > yourfilename.txt”. let our file name be CSpoint.txt. let’s try to create it in the terminal…
As you can see the “CSpoint.txt” file has been created.
ii. By using “echo” command
The “echo” command is used to create a non-empty file.
To use this command we have to write “echo some textcontent yourfilename.txt”. Let our text content is “Hello guys welcome to computertstudypoint” and our filename is “CMD.txt”
Let’s try it out…
As you can see the “CMD.txt” file has been created with some content “hey guys welcome to computerstudypoint”.
iii. By using “notepad” command
“notpad” is the easy way to create a new file. To use this command we have to write “notepad yourfilname.txt”. Let our new file name be “prompt.txt”. let’s try to create new file in the terminal…
As you can see the “prompt.txt” has been created. And, the left side of prompt.txt has 0 which means this file is totally empty there has no data or 0 data.
“del” delete command that helps to delete all the files of our system. let’s remove some files like I am going to remove all those these files which I recently created (CMD.txt, CSpoint.txt, and prompt.txt), To delete these three files so we have to write “del CMD.txt CSpoint.txt peompt.txt” in the terminal. let’s try this command…
As you can see the three files which I created recently have been deleted.
“cls” is a clear command that is used to clear all the text of the terminal.
As you can the “cls” command has cleaned our terminal.
The “exit” command is used to exit the terminal window. I don’t think I should show you this command in the terminal😅.