Command Prompt is a command line interpreter application available in most Windows operating systems. It's used to execute entered commands.
Windows + R
systeminfo
Shows every system detail like OS version, OS Name, etc.
Host Name: SARALCODE
OS Name: Microsoft Windows 11 Home Single Language
OS Version: 10.0.22623 N/A Build 22623
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
...
ver
Shows the version of Windows
Microsoft Windows [Version 10.0.22623.741]
date
time
date /t
time /t
ipconfig
ipconfig /all
ipconfig
shows ipv4 address Default Gateway, etc.
ipconfig /all
shows extended details of ipconfig with lots of other information.
cls
It will Clear the Command Prompt Screen.
d:
Go to D:/
drive
Write the drive letter like C, D, E, F, and then a colon(:) and press enter
dir
Shows every file and folder of the current location or directory.
cd FolderName
Go inside that folder
Write “cd “ and then keep pressing the Tab
it will show you folder names inside that directory.
cd ..
cd ../../
../
to as much as you want to go back. mkdir foldername
md foldername
Both commands are the same mkdir or md means "Make Directory" and it will create a folder with the given name.
mkdir folder1 folder2 folder3
It will create 3 folders named "folder1", "folder2" and "folder3"
rename oldname newname
ren oldname newname
Both commands are the same rename or ren and it will Rename the folder with the given name.
rmdir foldername
It will Remove the folder
del foldername
It will remove all files inside that folder
type nul > file1.txt
It will create a file name "file1.txt"
Similarly, you can create any file by specifying "filename.extension"
Like: - file.c, file2.java, etc.
rename <oldname> <newname>
ren <oldname> <newname>
Both commands are the same rename or ren and it will Rename the file with the given name.
del file1.txt
erase file1.txt
Both commands are the same. They will delete the file named file1.txt.
notepad file1.txt
It will Open file1.txt
in Notepad
copy file1.txt file2.txt
It will ask you Overwrite "file2.txt”
Press y and then all text of file1 copied to file2
move file1.txt folder2
It will move the file1.txt
to the folder2
type file1.txt
It will print all the text of file1.txt
in CMD