1.2 - Windows Command Line Tools Flashcards
1
Q
Privileges
A
- Not all users can run all commands
– Some tasks are for the administrator only - Standard privileges
– Run applications as normal user
– This works fine for many commands - Administrative/elevated privileges
– You must be a member of the Administrators group
– Right-click Command Prompt,
choose Run as Administrator
– cmd, Ctrl+Shift+Enter
2
Q
Command line troubleshooting
A
- Use “help” if you’re not sure
> help dir
> help chkdsk - Also use:
[command] /?
– Close the prompt with exit
3
Q
File management
A
-
dir
– List files and directories -
cd / chdir
– Change working directory
– Use backslash \ to specify volume or folder name -
..
– Two dots/periods
– The folder above the current folder -
md / mkdir
– Make a directory -
rd / rmdir
– Remove directory
4
Q
Drive letters
A
- Each partitions is assigned a letter
– Primary storage drive is usually C - Reference the drive with the letter and a colon
– C: - Combine with the folder
– Folder names are separated with backslashes
– C:\Users\professor
5
Q
CMD - hostname
A
- View the name of the device
– This is very useful when there are 10 different terminal
screen tabs in use - This is the Windows Device name
– Name can be changed in the System settings
6
Q
CMD - format
A
- Formats a disk for use with Windows
- BE CAREFUL - YOU CAN LOSE DATA
- format c:
7
Q
CMD - copy (/v, /y)
A
- Copy files from one location to another
/v - Verifies that new files are written correctly
/y - Suppresses prompting to confirm you want to
overwrite an existing destination file
8
Q
CMD - xcopy
A
- Copies files and directory trees
xcopy /s Documents m:\backups
9
Q
Robust Copy
A
- robocopy
– A better Xcopy
– Included with Windows 10 and 11
10
Q
Managing Group Policy
A
- Group Policy
– Manage computers in an Active Directory Domain
– Group Policy is usually updated at login -
gpupdate
– Force a Group Policy update
– gpupdate /target:{computer|user} /force
– gpupdate /target:user /force -
gpresult
– Verify policy settings for a computer or user
– gpresult /r
– gpresult /user sgc/professor /v
11
Q
CMD - shutdown
A
- Shutdown a computer
– And optionally restart -
shutdown /s /t nn
– Wait nn seconds, then shutdown -
shutdown /r /t nn
– Shutdown and restart after nn seconds -
shutdown /a
– Abort the countdown!
12
Q
CMD - sfc
A
- System File Checker
– Scan integrity of all protected system files - sfc /scannow
13
Q
Check Disk
A
-
chkdsk /f
– Fixes logical file system errors on the disk -
chkdsk /r
– Locates bad sectors and recovers readable information
– Implies /f - If volume is locked, run during startup
14
Q
CMD - diskpart
A
- Manage disk configurations
- BE CAREFUL - YOU CAN LOSE DATA
– diskpart - start the DiskPart command interpreter
15
Q
CMD - winver
A
- View the About Windows dialog
– A quick check - Useful when troubleshooting
– Are you running the latest version?