commands Flashcards

from MCC class

1
Q

dir

A

To view the directories and subdirectories inside your current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

cls

A

Clear the command prompt window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

c: or d: or e:

A

Set a particular drive as your current drive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

cd boot/en-us

A

Set a directory to be the current directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

dir c:\users /ah

A

View the files and folder of another directory from your current location
You will need to provide the complete path of the directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

/ah

A

The /a parameter along with the /h attribute displays all hidden files and directories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

dir c:\windows*.exe /s /b

A

To see a specific set of files under a directory, including the subdirectories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

dir (name) /s

A

The /s parameter displays all files with the matching criteria in the parent and subdirectories

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

dir (name) /b

A

The /b parameter displays only the path and the file names, which makes the output more readable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

c:

A

To navigate back to the original location, which was c:\users\administrator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(command) /?

A

To know more about the parameters of a command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

ipconfig

A

The ipconfig command allows you to view a few network related parameters. Those parameters are: IP address, subnet mask, and default gateway.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ipconfig /all

A

To view the complete details of the IP addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ipconfig /flushdns

A

To clear the DNS cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ipconfig /registerdns

A

To re-register DNS names

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ipconfig /displaydns

A

To display the DNS Resolver Cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

ipconfig /release

A

To release the dynamically assigned IP address(s) on one or more network adapters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

ipconfig /renew

A

After releasing the IP addresses, you can get the IP addresses from a DHCP server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

ping

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

ping -n 3 (ip address)

A

The -n parameter sends a pre-defined number of packets to the mentioned IP address, and requests the responses to be returned.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

ping -a (ip address)

A

To find the hostname of a system with the -a parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

ping -t (ip address)

A

Run the ping command indefinitely. Press CTRL + C to terminate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

tracert (ip address)

A

To trace the path to a destination system (trace route)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

tracert -d (ip address)

A

To trace the path to a device without performing name resolution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

netstat

A

Shows all the active Transmission Control Protocol (TCP) connections and their state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

TCP

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

UDP

A

The User Datagram Protocol (UDP) does not provide reliable data service but utilizes reduced latency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

netstat -o

A

To view the state of all TCP connections with each connection’s Process ID (PID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

netstat -s -p tcp

A

To view the information about a particular protocol, such as TCP, type the following command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

netstat -e -t 5

A

To update the connection statistics every few seconds, such as 5 seconds. CTRL + C to stop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

netstat -a

A

To list all TCP and UDP connections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

nslookup

A

The nslookup command displays information which is useful for identifying issues related to this domain name system (DNS). CTRL + C to stop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

nslookup (domain.com)

A

To find the A record for a domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

nslookup -type=ns (domain.com)

A

To find the NS (name server) record for a domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

nslookup -type=soa (domain.com)

A

To query the SOA (Start of Authority) record for a domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

nslookup -type=any (domain.com)

A

To find all DNS records for a domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

nslookup (ip address)

A

To perform a reverse lookup from an IP address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

nslookup -timeout=200 (domain.com)

A

To increase the timeout (200 is the timeout time)

39
Q

nslookup -debug (domain.com)

A

Generates the questions and answers with the detailed information

40
Q

shutdown

A

The shutdown command is used to shut down the machine or restart it. It can be used for the local system, as well as for a remote system, connected over the network.

41
Q

shutdown /r

A

To restart the system with prompt

42
Q

shutdown /r /t 0

A

To restart the system immediately

43
Q

dism

A

Deployment Image Servicing and Management. This utility is used to identify the issues with your windows system files and fix the errors. This command has three key parameters. One is checking health; another is scan health and third is restore health.

44
Q

dism /online /cleanup-image /checkhealth

A

The dism command with the /checkhealth parameter detects the corruption but does not repair it

45
Q

dism /online /cleanup-image /scanhealth

A

The dism command with the /scanhealth parameter scans for issues in the Windows image

46
Q

dism /online /cleanup-image /restorehealth

A

The dism command with the /restorehealth parameter scans for issues in the Windows image and then repairs the issues automatically

47
Q

sfc

A

SFC is short for System File Checker. As the name indicates, it performs fault identification and corrections of system files. If some system functions are not working, or the operating system is crashing, you can use sfc to detect issues and perform corrective measures.

48
Q

sfc /scannow

A

The /scannow parameter of the sfc command checks the protected system files and repairs them if required. May take 10-20 minutes.

49
Q

sfc /scanfile=(c:\windows\system32\ieframe.dll)

A

Use the sfc command to repair a specific file

50
Q

sfc /verifyonly

A

The /verifyonly parameter of the sfc command is use to verify protected files. May take 60 minutes.

51
Q

chkdsk

A

The ckhdsk command scans the specified sector of a local hard disk drive or the specified external storage device, attached to the computer system.

52
Q

chkdsk /C

A

The /C parameter skips checking cycles in the folder structure

53
Q

chkdsk c: /f

A

The /f parameter to fix the hard drive errors

54
Q

chkdsk c: /r

A

The /r parameter to locate bad sectors.

55
Q

chkdsk c: /f /r

A

The /f parameter to fix the hard drive errors along with the /r parameter to locate bad sectors

56
Q

diskpart

A

The diskpart command is used to perform partitioning activity. If you want to create a new primary segment inside one of your existing drives, or if you want to delete a particular drive of your storage device.

57
Q

list disk

A

To list the available disks in the system. Used after the command: diskpart

58
Q

select disk (1)

A

To select a disk.

59
Q

list partition

A

To list the partitions on the selected disk

60
Q

select partition (2)

A

To select a partition

61
Q

active

A

To make the partition active

62
Q

Format FS=NTFS label=F quick

A

To quick format the partition with the NTFS file system, and then assign drive letter (F) to it

63
Q

(diskpart) exit

A

To exit from diskpart

64
Q

taskkill

A

The taskkill command allows you to end a particular task or a process under execution. It is done by mentioning one of the parameters of that particular task. You either need to specify the image, name or the PID associated with the task you wish to end.

65
Q

tasklist

A

To list the tasks or processes

66
Q

taskkill /f /im (notepad.exe)

A

To forcefully kill the open (notepad.exe) window

67
Q

taskkill /pid (PID #)

A

To kill a process using its PID

68
Q

gpupdate

A

A user can run the gpupdate (group policy update) command on the local system to apply the policy. The domain in which a policy is created, the recipient system must be part of it. A policy could be local or domain-based. By default the gpupdate command, user and computer policies are applied.

69
Q

gpupdate /force

A

To apply all the policies, not only the ones that have changed

70
Q

gpupdate /Target:User

A

To apply to user only.
By default the gpupdate command, user and computer policies are applied.

71
Q

gpupdate /Wait:0

A

To remove the wait time. The default number of seconds to wait for policy processing is 600 seconds.

72
Q

gpresult

A

The gpresult command generates the resultant set of the applicable policies after considering the overlapping. These policies can overlap in nature.
For each user or the machine, there is a set of policies which gets applied. These policies are about how to the application programs, resources based on the network and the operating system behave for that particular user or a computer.

73
Q

gpresult /r

A

To display the Resultant Set of Policy (RSoP) summary data

74
Q

gpresult /z

A

To display all the information about Group Policy

75
Q

gpresult /s (computer) /r

A

To display policy details of a remote computer

76
Q

format

A

The format command allows a user to format a selected partition. Once formatted, the contents of that particular segment of the storage device are lost.

77
Q

format d: /q

A

To format the D drive

78
Q

copy

A

The copy command allows you to copy a file from one location to another. The other location is to be specified by you, as a parameter, while issuing the command. The copy command keeps the original file as it is, and creates another instance of the file at the specified location.

79
Q

type NUL > ABCD.txt

A

Create an empty text file named ABCD.txt

80
Q

copy ABCD.txt c:\Users

A

Copy file named ABCD.txt from the current directory to c:\Users

81
Q

copy /Y ABCD.txt c:\Users

A

Copy file named ABCD.txt from the current directory to c:\Users WITHOUT getting OVERWRITE warning

82
Q

xcopy

A

The xcopy command is used to copy the files, as well as directories, from their source location to the specified location. The specified location is a parameter, passed by the user. While copying a directory, this command copies its sub-directories as well, if present.

83
Q

xcopy /Y *.txt C:\Users

A

To copy all text files in the current directory to the Downloads directory

84
Q

robocopy

A

The robocopy command copies file data. The necessary parameters have to be passed in the command itself such as source directory, destination directory, and file, whose contents are to get copied, etc. Robocopy will keep the original files, and create a replica at the specified location.

85
Q

robocopy Downloads c:\Users

A

To copy the Downloads directory files and sub-directories to c:\Users

86
Q

net

A

The net command is used to connect your computer system to the shared folder/drive on the network. Direct access to such shared directory, treating it as if it were a local directory/drive.

87
Q

net use (z):

A

View the existing network(x) connection that has been mapped to a drive letter (z) on your system

88
Q

net use x: \(drive name)\c$ /persistent:yes

A

Map a network share or drive to a specific drive letter on your system.
The /persistent parameter can have either yes or no value.
The value of yes means that the mapping will be available when you log on to the system next time. The value of no means that the mapping is limited to this session only.

89
Q

net use (x): /delete

A

Delete the drive (x) mapping

90
Q

net user

A

To view the list of users on the local system.
The net user command allows you to perform user account-related tasks on the computer. This command allows you to create a new user, as well as modify the user account-related parameters.

91
Q

net user (administrator)

A

To view the information about a specific user account on the local system

92
Q

net user (wilson) (Passw0rd) /add /times:ALL

A

To create a new account with the name (wilson) with ((Passw0rd)

93
Q

net user (wilson) /delete

A

To delete the user (wilson)