commands Flashcards
from MCC class
dir
To view the directories and subdirectories inside your current directory
cls
Clear the command prompt window
c: or d: or e:
Set a particular drive as your current drive
cd boot/en-us
Set a directory to be the current directory
dir c:\users /ah
View the files and folder of another directory from your current location
You will need to provide the complete path of the directory.
/ah
The /a parameter along with the /h attribute displays all hidden files and directories
dir c:\windows*.exe /s /b
To see a specific set of files under a directory, including the subdirectories
dir (name) /s
The /s parameter displays all files with the matching criteria in the parent and subdirectories
dir (name) /b
The /b parameter displays only the path and the file names, which makes the output more readable.
c:
To navigate back to the original location, which was c:\users\administrator
(command) /?
To know more about the parameters of a command
ipconfig
The ipconfig command allows you to view a few network related parameters. Those parameters are: IP address, subnet mask, and default gateway.
ipconfig /all
To view the complete details of the IP addresses
ipconfig /flushdns
To clear the DNS cache
ipconfig /registerdns
To re-register DNS names
ipconfig /displaydns
To display the DNS Resolver Cache
ipconfig /release
To release the dynamically assigned IP address(s) on one or more network adapters
ipconfig /renew
After releasing the IP addresses, you can get the IP addresses from a DHCP server
ping
Ping command is used to check the status of a network device or system on the network. When you execute the ping command, it sends Internet Control Message Protocol (ICMP) Echo Request messages to the destination system.
ping -n 3 (ip address)
The -n parameter sends a pre-defined number of packets to the mentioned IP address, and requests the responses to be returned.
ping -a (ip address)
To find the hostname of a system with the -a parameter
ping -t (ip address)
Run the ping command indefinitely. Press CTRL + C to terminate.
tracert (ip address)
To trace the path to a destination system (trace route)
tracert -d (ip address)
To trace the path to a device without performing name resolution
netstat
Shows all the active Transmission Control Protocol (TCP) connections and their state.
TCP
Transmission Control Protocol (TCP) connection is a reliable, ordered delivery of a stream of bytes, which are sent from one system to another system on the network.
UDP
The User Datagram Protocol (UDP) does not provide reliable data service but utilizes reduced latency.
netstat -o
To view the state of all TCP connections with each connection’s Process ID (PID
netstat -s -p tcp
To view the information about a particular protocol, such as TCP, type the following command
netstat -e -t 5
To update the connection statistics every few seconds, such as 5 seconds. CTRL + C to stop
netstat -a
To list all TCP and UDP connections
nslookup
The nslookup command displays information which is useful for identifying issues related to this domain name system (DNS). CTRL + C to stop.
nslookup (domain.com)
To find the A record for a domain
nslookup -type=ns (domain.com)
To find the NS (name server) record for a domain
nslookup -type=soa (domain.com)
To query the SOA (Start of Authority) record for a domain
nslookup -type=any (domain.com)
To find all DNS records for a domain
nslookup (ip address)
To perform a reverse lookup from an IP address