What is the CMD ? How to use it?
What is the cmd?
Command prompt or CMD as we will use it here. It is a scripting console. It is possible to access all computer-related information through this console. There are two different methods to access the CMD code console. The first of these is to type CMD in Windows search. The other is to write CMD on the screen that opens after pressing the Windows and R keys on the keyboard at the same time.
The most used cmd commands:
cd -points to the directory we are currently in
cd car -switch to car directory
dir -list directory contents
cd .. -1 go back directory
cd/ -switch to root directory(top directory)
type nul >book.txt — create txt file named book
type book.txt — looking at the contents of the book.txt file
echo hello >book.txt -deleting the contents of the book.txt file and typing “hello” in the first line
echo hello >>book.txt -Writing “hello” to the new line without deleting the contents of the book.txt file
cls -clear screen
mkdir car -create new directory named car
rename test.txt cat.txt -rename the test.txt file to cat.txt
Copy test.py user/cat -test.py to user/cat
del test.py -deleting test.py
rmdir test -delete test directory (for empty directory)
rd /s/q C:\Users\HP\Desktop\test -delete directory (but directory path must be full)
move test.py user/cat — Cut out the test.py file to user/cat
whoami — check active user id
tree — Arrange the files in the directory you are in tree form
net user — look at registered users on the computer
net user username — information about the user
net user username * -set or reset password for user
net user username 123 /add -create new user with password 123
net user username /delete -delete user
net localgroup -usergroups on the computer
net localgroup Administrators -admin authorized users
net localgroup Administrators username /add -give the user admin privileges
net view -devices on the same network
findstr /si car: *.txt *.py — find all txt and py files containing car
netsh wlan show profile -networks you are connected to
netsh wlan show profile name=’wifi ssid-si’ key=clear -info about wifi (password etc.)
runas /user:username cmd.exe -switch to other user
arp -a -arp table
net start -started services
shutdown -s -f -t 5 -shuts down the computer in 5 seconds
systeminfo -information about the system
hostname -computer name
echo %username% -username
ipconfig -all -all network info
netstat -ano -aktiv network info
netstat — shows connections to the computer.
calc.exe = Used to open the calculator.
diskmgmt.msc = Used to open disk management.
devmgmt.msc = Used to open device manager.
dfrg.msc = Used to open defragmenter.
eudcedit.exe = Used to produce characters.
appwiz.cpl = It opens the add and remove programs screen.
access.cpl = Used to open accessible options.
accwiz.exe = Opens the available options wizard.
desk.cpl = Used to open display properties.
eventvwr.exe = Opens event viewer.
freecell.exe = Used to open the playing card game.
fsmgmt.msc = Opens the shared folder menu.
hdwwiz.cpl = Opens the add hardware wizard.
iexpress.exe = It is used to open the Setup application.
inetcpl.cpl = Used to open Internet properties.
intl.cpl = Used to open region and language settings.
joy.cpl = Used to open game controls.
magnify.exe = Used to open magnifier.
main.cpl = Used to open mouse properties.
mmsys.cpl = It opens the sound settings.
mspaint.exe = Used to open Paint.
narrator.exe = Used to open the English screen reader.
ntbackup.exe = Opens the backup wizard.
nusrmgr.cpl = Used to open user accounts.
osk.exe = Used to open the on-screen keyboard.
gpedit.msc = Used to open the local group screen.
msconfig.exe = Used to open the system configuration screen.
verifier.exe = Used to open the driver verification screen.
drwtsn32.exe = Used to open the problem diagnosis tool.
dxdiag.exe = Used to open DirectX screen.
mobsync.exe = It provides general synchronization.
mplay32.exe = Opens the basic version of Media Player.
odbcad32.exe = It opens the database processing screen.
packager.exe = It is used to open object packager.
progman.exe = Used to open the desktop manager.
rasphone.exe = Used to open the access book.
shrpubw.exe = Used to open internet sharing information.
syskey.exe = Used to open the password database screen.
sndrec32.exe = Used to open the audio recording screen.
winchat.exe = Used to open the Windows messaging application.
write.exe = Used to open WordPad.
wupdmgr.exe = Used to open the Windows update screen.
explorer.exe = Used to open Windows Explorer.
powercfg.cpi = Used to open the computer’s power options.
rasphone.exe = Used to open the network connection screen.
regedit32.exe = Used to open the Windows Registry Editor screen.
sndvol32.exe = It opens the sound recording setup screen.
taskmgr.exe = Used to open task manager.
compmgmt.msc = Used to open computer management.
clipbrd.exe = Used to open the clipboard processor.
cleanmgr.exe = Used to open the disk cleaner screen.
ciadv.msc = Used to open the directory manager.
charmap.exe = Used to set characters.
desk.cpl = It opens the display settings.
hdwwiz.cpl = Used to open device manager.
inetcpl.cpl = Used to open the Internet control screen.
wuaucpl.cpl = It opens the automatic update screen.
Commands for opening files:
comexp.msc = Used to open component services.
certmgr.msc = Used to open the Certificates screen.
eventvwr.msc = Used to open the event viewer screen.
services.msc = Used to open the Services screen.
cladv.msc = Used to open the indexing services screen.
dfrg.msc = Used to open the defragmenter feature screen.
secpol.msc = Used to open the local security screen.
perfom.msc = Used to open the performance screen.