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
netstat
Shows all the active Transmission Control Protocol (TCP) connections and their state.
26
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.
27
UDP
The User Datagram Protocol (UDP) does not provide reliable data service but utilizes reduced latency.
28
netstat -o
To view the state of all TCP connections with each connection's Process ID (PID
29
netstat -s -p tcp
To view the information about a particular protocol, such as TCP, type the following command
30
netstat -e -t 5
To update the connection statistics every few seconds, such as 5 seconds. CTRL + C to stop
31
netstat -a
To list all TCP and UDP connections
32
nslookup
The nslookup command displays information which is useful for identifying issues related to this domain name system (DNS). CTRL + C to stop.
33
nslookup (domain.com)
To find the A record for a domain
34
nslookup -type=ns (domain.com)
To find the NS (name server) record for a domain
35
nslookup -type=soa (domain.com)
To query the SOA (Start of Authority) record for a domain
36
nslookup -type=any (domain.com)
To find all DNS records for a domain
37
nslookup (ip address)
To perform a reverse lookup from an IP address
38
nslookup -timeout=200 (domain.com)
To increase the timeout (200 is the timeout time)
39
nslookup -debug (domain.com)
Generates the questions and answers with the detailed information
40
shutdown
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
shutdown /r
To restart the system with prompt
42
shutdown /r /t 0
To restart the system immediately
43
dism
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
dism /online /cleanup-image /checkhealth
The dism command with the /checkhealth parameter detects the corruption but does not repair it
45
dism /online /cleanup-image /scanhealth
The dism command with the /scanhealth parameter scans for issues in the Windows image
46
dism /online /cleanup-image /restorehealth
The dism command with the /restorehealth parameter scans for issues in the Windows image and then repairs the issues automatically
47
sfc
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
sfc /scannow
The /scannow parameter of the sfc command checks the protected system files and repairs them if required. May take 10-20 minutes.
49
sfc /scanfile=(c:\windows\system32\ieframe.dll)
Use the sfc command to repair a specific file
50
sfc /verifyonly
The /verifyonly parameter of the sfc command is use to verify protected files. May take 60 minutes.
51
chkdsk
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
chkdsk /C
The /C parameter skips checking cycles in the folder structure
53
chkdsk c: /f
The /f parameter to fix the hard drive errors
54
chkdsk c: /r
The /r parameter to locate bad sectors.
55
chkdsk c: /f /r
The /f parameter to fix the hard drive errors along with the /r parameter to locate bad sectors
56
diskpart
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
list disk
To list the available disks in the system. Used after the command: diskpart
58
select disk (1)
To select a disk.
59
list partition
To list the partitions on the selected disk
60
select partition (2)
To select a partition
61
active
To make the partition active
62
Format FS=NTFS label=F quick
To quick format the partition with the NTFS file system, and then assign drive letter (F) to it
63
(diskpart) exit
To exit from diskpart
64
taskkill
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
tasklist
To list the tasks or processes
66
taskkill /f /im (notepad.exe)
To forcefully kill the open (notepad.exe) window
67
taskkill /pid (PID #)
To kill a process using its PID
68
gpupdate
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
gpupdate /force
To apply all the policies, not only the ones that have changed
70
gpupdate /Target:User
To apply to user only. By default the gpupdate command, user and computer policies are applied.
71
gpupdate /Wait:0
To remove the wait time. The default number of seconds to wait for policy processing is 600 seconds.
72
gpresult
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
gpresult /r
To display the Resultant Set of Policy (RSoP) summary data
74
gpresult /z
To display all the information about Group Policy
75
gpresult /s (computer) /r
To display policy details of a remote computer
76
format
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
format d: /q
To format the D drive
78
copy
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
type NUL \> ABCD.txt
Create an empty text file named ABCD.txt
80
copy ABCD.txt c:\Users
Copy file named ABCD.txt from the current directory to c:\Users
81
copy /Y ABCD.txt c:\Users
Copy file named ABCD.txt from the current directory to c:\Users WITHOUT getting OVERWRITE warning
82
xcopy
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
xcopy /Y \*.txt C:\Users
To copy all text files in the current directory to the Downloads directory
84
robocopy
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
robocopy Downloads c:\Users
To copy the Downloads directory files and sub-directories to c:\Users
86
net
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
net use (z):
View the existing network(x) connection that has been mapped to a drive letter (z) on your system
88
net use x: \\(drive name)\c$ /persistent:yes
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
net use (x): /delete
Delete the drive (x) mapping
90
net user
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
net user (administrator)
To view the information about a specific user account on the local system
92
net user (wilson) (Passw0rd) /add /times:ALL
To create a new account with the name (wilson) with ((Passw0rd)
93
net user (wilson) /delete
To delete the user (wilson)