Windows Commands Flashcards
cd
used to move into a different directory
dir
used to display a list of directory and subdirectory files
md
used to create new directories and subdirectories within the file system
rmdir
used to delete or remove an empty directory or sub directory within the file system
copy
used to copy one or more files
xcopy
used to copy files, directories, and subdirectories. It provides more advanced options than the basic copy command, such as the ability to copy subdirectories and preserve file attributes like timestamps and permissions. Xcopy can also be used to synchronize directories and copy files in bulk.
robocopy
used to copy files, directories, and subdirectories with support for longer files names and network paths. Newer version of xcopy.
diskpart
used to manage the computer’s disk drives, partitions, volumes, and virtual hard disks
format
used to delete the contents of the storage device and create a new file system structure on that drive
chkdsk
used to scan the file system for file system metadata errors. /f - fix errors. /r - fix errors and recover bad sectors and recover files stored there.
ipconfig
displays the current TCP/IP network configuration and refreshes DHCP and DNS settings. /release - gets rid of the lease. /renew - renews the lease
/diplaydns - displays dns resolver cache. /flushdns - clear contents of dns cache
ping
used to verify IP level connectivity to another TCP/IP computer by sending ICMP packets using echo request messages to the destination and calculating the time it takes to receive a response
tracert
used to determine the path by sending an ICMP packet to the first router with a TTL of 1 (which in ICMP, is the amount of routers the packet is allowed to pass through). The receiving router then decreases it by one and sends it back with a time exceeded message. tracert will record the latency and ip and then send the ICMP packet back to that router with a TTL of 2 to get to the next router and so on…
pathping
more detailed tool that provides network latency and network loss information. combines the functionality of ping and tracert
/?
A command-line switch that displays help information for a particular command. When used with a command, it provides detailed information about the command’s syntax, parameters, and options.
cls
clear the screen of all previously executed commands and their output.
type
display the contents of a text file on the command prompt.
shutdown
shuts down the computer. /r - restart. /f - force close running applications. /fw - boot into firmware. /s - shutdown
sfc
provides a manual interface for verifying system files and repair/restore them from the cache.
systeminfo
displays operating system configuration info for a local or remote machine
|more
displays info one page at a time
nslookup
query the DNS. ‘nslookup’ - enter interactive mode.
netstat
checks for open ports on a given client and looks for ports or connections on listening mode. “-a” flag displays all active connections and listening ports, the “-n” flag displays addresses and port numbers in numerical format, and the “-o” flag displays the process ID (PID) of the process that initiated the connection.
gpedit
Group Policy Editor.
gpupdate
refresh the local and/or remote Group Policy settings on a Windows computer.
gpresult
shows the Group Policy settings that are currently in effect.
net user
display information about the user accounts on a Windows computer.
net use
connect to or disconnect from shared resources on a network, such as file shares or printer
certutil
used to manage digital certificates and generate checksums. syntax to make a checksum of a file: certutil -hashfile {file_name} {hash method ex. md5}