1.2 Flashcards
In what circumstances might you use the ipconfig/flushdns command ?
Clears the DNS cache to acces sites.
Or if you have security concerns
What does the hostname command do ?
Prints only the NetBios name of the PC
Try it on the command line now
What windows command should you use to find the name of a computer ?
Hostname
What command is used to see what ports are listening on the TCP/IP-based system ?
Netstat
-a shows all ports
/? shows other options
What can Netstat be useful for ?
Monitor traffic on ports for suspicious usage.
How do you exit from most command scenrios ?
ctrl + c
Open up Powershell and look at the different options for nslookup. Try quering and chaging around the Ipv4 to ipv6
Basically type nslookup and then help
https://www.youtube.com/watch?v=jf-x76XYY2o
What does CHKDSK do ?
Scans a disk in hopes of recovering corrupted files
What does the net user command do ?
Add, remove, and change user accounts.
What does the net use command do ?
Used to connect to a network share.
What does the tracert (traceroute) command do ?
Verify the path a network packet travels to its destination. I.e. returns a hop count.
https://www.youtube.com/watch?v=up3bcBLZS74
What is the difference between copy and xcopy ?
Xcopy is designed to copy directories as well as files.
https://www.youtube.com/watch?v=0q3rGK_IMZg
What are the benefits of ROBOCOPY
Keep NTFS permissions intact
Verifications and Speed
What does GPUpdate do?
Forces a device to update policies
What does the System File Checker command do ?
Verifies the versions of system files on your computer.
What does the diskpart command do ?
Partition management
Shows the partitions
https://www.youtube.com/watch?v=qH9PxrKMwCQ&t=14s
What does the winver command do ?
Shows which version of Windows is running.
Anything you put on the end of a command and a command line is known as…
A switch.
What Microsoft command will take you straight to the root directory ?
cd \
Whats the main subtle difference between the linux CLI and Winwdows CLI ?
Windows \
Linux /
What will this command do ?
Format e: /FS:NFTS
Format a drive calle ‘e’ and use the file system ‘fs’ type called NFTS
What does the chmod command do ?
Modifies linux permissions
What does the Chown command do ?
Enables root users to take control of any Linux file/folder
What does the tasklist command do ?
Lists all running proccesses
What does the task kill command do ?
Shuts down a task/programme
What does this command do ?
taskkill /PID 21104
It will kill the programme with a process ID (PID) 21104.
Open up the command prompt in admin mode and navigate your way to the user account associated with your PC
cd\users\jon_s
In Powershell spaces are important: cd \users\jon_s
Open up the cmd and make a directory called Temp1.
Verify then delete Temp 1.
Basically get into your users account then type the command: “md Temp1”. Verify with “dir”
To delete type “rd Temp1”. Verify with “dir”.
What windows command allows you to delete a file ?
Type “del filename”
How do wildcards work at the command prompt ?
You type a symbol in to account for multiple file names and will just refer to the file type extension at the end
Example “*.txt” will highlight all txt files regardles of the file name.
How would you go about deleting thousands of Jpeg files within a folder ?
“del *.jpeg”
What command would you need to copy a file called “jon.txt” to a removable drive labeled K ?
“Copy jon.txt k:” the result below should yield
“One file(s) copied”
What wildcard allows you select all file types within a folder ?
. Splat dot splat.
What does the format command do?
Wipes data off disks and installs a file system type.
What is the difference between SFC and DISM ?
SFC check your local back up
DISM checks a known online version from Microsoft.
What does the DISM command do ?
Download correct files from a good source.
Why is the gpupdate command useful ?
Performs update without cycling through the login process.
What does this command do ?
convert e: /FS:NTFS
It will ‘convert’ the drive labelled ‘e’s file system ‘FS’ to the type NTFS.
What happens after a drive is formatted ?
The directory structured. You divide the partition into logical locations for storing data.
What is resmon.exe and what does it do ?
Resource monitor.
Displays hardware/software info resources in real time.
What is msinfo32.exe ?
System info
What is msconfig.exe and what does it do ?
System config.
Helps troubleshot start up problems
What is dfrgui.exe ?
Disk defrag
- Open a command prompt by click Starting, typing cmd in the Open field, and clicking OK.
- Change to the root of your C: drive by typing cd /d C:\ and pressing Enter. Note: If you are already in C:, all you have to do is type cd \ and press Enter.
- Create a directory called C14 by typing md C14, press Enter.
- Change to the C14 directory,type cd C14 and press Enter.
- Create several layers of subdirectories at once. Type md A1\B2\C3\D4 and press Enter. You now have a directory structure that looks like this: C:\C14\A1\B2\C3\D4.
- Change back to your root directory by typing cd .
- Attempt to delete the C14 directory by typing rd C14 and pressing Enter. Windows won’t let you delete the directory because the directory is not empty. This is a safety measure. Now let’s really delete it.
- Delete the C14 directory and all of its subdirectories by typing rd /s C14 and pressing Enter. You will be asked whether you’re sure that you want to delete the directory.
- If you are, type Y and press Enter.
What does the NSlookup command do ?
Show the current DNS server and IP addresses for provided name.
Which of the network command-line tools enables obtaining an FQDN-to-IP address mapping?
nslookup
Which Command Prompt utilities in MS Windows allows to verify the file system integrity and fix logical file system errors?
Chkdsk
What does the sfc Command Prompt utility in MS Windows do ?
Checks a disk and displays a status report
Which command-line commands in Windows can be used to display help information related to a specific utility?
command /?
help command
Which netstat parameter allows to display all active TCP connections and the TCP/UDP ports on which the computer is listening?
-a
Which netstat parameter displays addresses and port numbers in numerical form?
-n
What does the /f switch of the chkdsk Command Prompt utility ?
Fixes errors on the disk
What does the /r switch of the chkdsk command-line utility do ?
Locates bad sectors and recovers readable information and Fixes errors on the disk.
Which copy command switch in Windows verifies that the new files are written correctly?
/v
What command will allow you change a file system whilst reataining data on the drive ?
Convert.
Describe where you are “C:\Windows\System32"
You are in the C drive, in a file called Windows and directory called System32.
What command is used to delete folders should files not folders check this question ?
Del
What command is used to delete folders ?
Rd
What command is used to delete a directory ?
Rd
What is tracert primarily used for ?
Used to determinte where the packet is being dropped.
What two command is pathping made up of ?
Tracert and ping.
What command is used to establish a connection to a shared resource/ network share?
Net Use
What command can be used to add and delete computer accounts ?
Net Computer
What command can be used to set network-related configuration ?
Net Config
What command can be used to set account options, password age, length, and so on ?
Net Accounts
What command is used to establish a connection to a shared resource?
Net Share
Which switch is used with DEFRAG to determine the degree of fragmentation only?
The /A switch is used with DEFRAG to analyze the state of fragmentation without running the operation.
Which switch is used with DEFRAG to print the progress of the operation on the screen?
The /U switch is used with DEFRAG to print the progress of the operation on the screen.
In Windows at the cmd prompt, What options do you have to change directory ?
cd or chdir
In Windows at the cmd prompt, What options do you have to make a directory ?
md or mkdir
Give some benefits of Robocopy over Xcopy
Copying methods
Reliability
Speed
Error Handling
What is the main difference between SFC and Chkdsk ?
Chkdsk will check file systems and hard drives.
Sfc will diagnose and repair system files that are essential for the Windows operating system to run properly.
What does the -p switch do with mkdir ?
Allows sub folders to be created as well.
What command helps you manage computer local drives ?
diskpart
What command can be used to diagnose packet loss to a destination website ?
pathping
What command can be used to verify a path a network packet travels to its destination ?
tracert
What command is used to wipe data off of a disk ?
format
What command copies files + folders to another location ?
Xcopy