. Command prompt is a native Windows application tool which acts as interpreter.
. It allows to interact with computer similar to the GUI.
. By writing commands in the Command prompt/ Command Shell, we can perform number of operations.
. To open Command prompt, Click on Windows > Run > Type Cmd and press Enter.
. It works on its the default location when we type commands in it.
. We can move into another drive by typing command D: and press Enter.
. Below table contains list of few important commands:
. Few commmands with detailed explanation:
. Files or folders can be encrypted using GUI by right click on that file > Properties > Advanced > Checking the encrypt file option> Apply
. We can also encrypt all the files the folder by using cipher /e command.
. After encrypting, we can make sure whether it is encrypted or not by typing cipher and looking all the files starts with E.
Command | Description |
---|---|
cd | To change the directory |
cd.. | Moves to its parent directory |
mkdir | Creates new directory |
copy con | Creates a new file in that directory and you can add text and press Ctrl+Z to save |
start | To open notepad |
attrib | To change the attributes of file like Read only, Hidden, Archieve etc |
date | To display the current date |
del | To delete file (s) from directory. (del *.jpeg removes all files of jpeg type) |
exit | To exit command prompt |
cls | To clear screen |
rd | To delete complete directory |
help | To display information on different commands we provide |
To print a file mentioned | |
rename | Renames a file name provided. Ex: rename abc.txt bob.txt |
replace | Replace a file with specified file |
copy | Copies content of one file into another file specified |
move | Moves the file to specified location |
type | Displays type of file |
more | Displays content of a text file |
find | Searches for a string in a mentioned file |
diskpart | Manages hard drive partitions |
netsh | Connects to network shell utility and manages network configuration |
netstat | Displays all open network connections and listening ports |
format | Formats a drive in diskpart field |
ftp | Connects to file transfer protocol and allows to share files between computers |
tasklist | Displays list of applications, services running on local computer |
taskkill | Terminates a running task which you specify |
tree | Displays folder structure graphically. |
. Few commmands with detailed explanation:
1. systeminfo
. It is used to know all the information of the computer.
2. ipconfig/all
. It gives complete information about the IP Address both IPv4 and IPv6 of your computer.
. It also shows details of DNS servers, DHCP, Mac address.
. It also shows details of DNS servers, DHCP, Mac address.
3. tracert
. It tracks how much time it takes to reach the destination passing the packets.
. Gives info about each step route between PC and target.
4. ping
. It sends series of test packets to specified address.
. If they arrived and returned, device is capable of communicating with that server.
. If it fails, it means there is communication problem to connect that particular server.
5. powercfg:
. It is used to track how computer uses energy.
. powerconfig/energy shows power saving status currently.
6. Changing ip address of a PC using Commands;
. To change ip address using Command Prompt, it should be run as Administrator.
. Type netsh and then enter. It allows to connect to Network Shell properties.
. Type interface ip show config to know current ip address.
. Type interface ip show config to know current ip address.
. Now change your current ip address by writing:
interface ip set address name ="Ethernet 2" static [IP address you want to change] [subnet mask] [network gateway]
7. Mac Addresses of all the devices in the network.
. We can get all the Mac address of the devices in our network by a command arp -a
8. Command to put all file names in a directory into a text file:
. dir> command writes all the files names in a directory into a text file.
. Move to the directory which you want to do this operation.
. Type dir /b > [specify text file location where you want to save].
. Now check the file.
9. Command to trace, encrypt and decrypt files:
. cipher is the command used to trace the encrypted files in that directory.
. Move to the directory where you want to trace encrypted files and type cipher.
. E indicates it is an encrypted file.
. U indicates it is not an encrypted file.
. We can also encrypt all the files the folder by using cipher /e command.
. After encrypting, we can make sure whether it is encrypted or not by typing cipher and looking all the files starts with E.
. Similarly we can decrypt all the files in that directory using cipher /d command.
. To encrypt a single file in a directory, we need to use command cipher /e /a [specific file location]
. Similarly we can decrypt specific file in directory using cipher /d /a [specific file with location]