1.2 given A Scenario, Use The Appropriate Microsoft Command Line To Flashcards
cd (change directory) purpose
Changes the current directory to a specified directory
Usage of: cd \
Changes to the root directory
Usage of: cd ..
Moves up one directory level
Usage of: cd foldername
Changes to a sub directory named “foldername”
Purpose of: dir (directory)
Display a list of files and subdirectories in the current directory
Usage of: dir
Lists all files and folders
Usage of: dir /a (attributes)
Includes hidden and system files in the listing.
The /a switch in the DIR command, stands for attributes and allows you to display files with specific attributes. When used without specifying any attributes, it display all files, including hidden and system files.
You can also use the backwards/a followed by specific attribute codes to filter the display like this dir /a:h lists only hidden files since h: hidden files
Purpose of: md or mkdir (make directory)
Creates a new directory
Usage of: md newfolder or mkdir newfolder
Create a directory called “newfolder”
Purpose of: rmdir or rd (remove directory)
Deletes an existing directory
Usage of: rmdir newfolder or rd newfolder
Remove the directory named “newfolder”
Purpose of Drive navigation inputs
Switches between different drives
Usage of C: and D:
Switches to the C: Drive and D: drive, respectively
Purpose of ipconfig
Displays network configuration details
Usage of ipconfig
Shows basic IP address, subnet mask, and default gateway
Usage of ipconfig /all
Displays detailed network configuration, including the NS and DHCP information
Purpose of command line: ping
Tests connectivity to another network device
Usage of: ping 8.8.8.8
Sends ICMP echo request to the specified IP address
What is ICMP
ICMP stands for the Internet control message protocol, and it is a network layer protocol used by network devices such as routers and hosts, to send error, messages, and operational information.
It plays a crucial role in diagnosing network, communication issues, and determining whether data reaches its intended destination in a timely manner
What are the functions of ICMP
Error reporting: ICMP communicates problems and data, transmissions, such as unreachable host or network, congestion, back to the source device
Diagnostic tools: utilities, like ping and traceroute use ICMP messages to test network connectivity and trace the path of packets through a network
How ICMP works
ICMP operates at the network layer and is encapsulated within IP packets. When a network device encounters an issue processing a packet, it send an ICMP message to the source, indicating the type of error encountered.
For example, if a router cannot forward a package due to an expired time to live (TTL) value, it sends and ICMP “time exceeded” message to the sender
Common ICMP message types
Echo request and echo reply: used by the ping utility to test reachability between devices
Destination unavailable: indicates that a packet could not reach its intended destination.
Time exceeded: informed the sender that our packet was discarded because its TTL expired .
Purpose of command line tool: hostname
Displayed the computer’s hostname
What is a hostname
The unique label assigned to a device such as a computer server or printer on a network, enabling it to be identified and access by other device within the network or over the Internet for example, if you name your computer Daisy or Stephanie’s computer.
Usage of: hostname
Outputs the name of the current machine
What is the purpose of commandline tool: netstat
Displays active network connections, and listening ports
What is the usage of? netstat -a
Shows all active connections and listening ports
What is the usage of: netstat -b
Display the executable involved in creating each connection (requires administrative privileges)
What does the b switch for the Netstat command mean?
The beast stands for binary and is used to display the executable involved in creating each connection or listening port. This feature is particularly useful for identifying which programs are responsible for specific network activities..
What is an executable?
An executable is a file that contains a program capable of being executed or run as a process on the computer. And Windows, executable typically have the.EXE extension. These files contain machine code that the operating systems loader can run to perform specific tasks and functions.