Section 12 ch. 15 Working with the cli Flashcards
What is the command in the CLI terminal to format a hard drive?
format and the hard drive letter and then the type of file system
Ex.- format C: /FS:NTFS
How what switch allows you to format a disk fast? and what would the full command look like?
the Q switch and it would be format C: /FS:NTFS /Q
what does chdsk do?
performs error correction on hard drives, scans the health of the disk, garbage collection,
What do (SFC) System file checker and (DISM) Deployment Image Servicing and Management do?
Take a look at the system storage, the backup files and check them against the working copy
When checking system storage and backup files which one do you run first SFC or DISM
System File Checker (SFC) - its going to look at your backup storage and compare the working files storage
When do you run (DISM) Deployment Imaging and service management do?
You run DISM when the backup storage and files may be corrupted
How do you run sfc in the command line?
type in the command sfc /scannow
How do you run DISM on the command line?
dism /online /cleanup-image /restorehealth
What is diskpart? and how do you start diskpart in the command line?
Wipes hard drives, creates partitions, formats drives and type in diskpart
What is the first command you do with diskpart?
run “list disk” command to see the disks
What is xcopy?
Allows you to copy files and directories and allows you to verify the data while its being copied
What is robocopy?
A faster version of xcopy
How do you run robocopy or xcopy in the command line?
Type in the name of the command then the drive you want to copy, what you want do, the drive where it will be copied and any switches
EX.
robocopy c:\backup x: add any switches you like
xcopy is the same
whats the command that allows you to copy files in linux
the “dd” command
What do gpupdate and gpresult do?
Forces policy updates to a system and lists the resultant policy
Whats the command to update repositories on Linux?
sudo apt-get update
What is Linux command to remove files/folders
apt-get remove
What does the linux command “ps” do?
Will show any processes tied with the user you are running as
What does the linux command “ps” do with the switch “aux” combined?
Shows all of the processes across other users and other parts of the computer
What linux command do you use to end a program?
kill and you use it by typing kill and the process id
What is the very old text editor for linux?
VI-text editor
What does the command icacls do?
Changes ntfs permissions
How do you use the command icacls?
icacls- folder or file you want to apply to - “/grant” User- : F for full control
EX.
icacls picsFolder /grant John:F
What does the chmod command?
Changes user permissions in Linux
If you wanted to give a user rwx permissions , group rw permissions and other read permissions in linux what do you do?
chmod 7 6 4 file_name
What does the linux command chown do?
Allows you to change ownership of a file or folder
How do you use the chown command if you wanted to change ownership of file “Lunch_songs” from ted to jerry?
chown jerry Lunch_songs
How do you change a password on linux through the terminal?
passwd
enter new password
then reenter password
What is a batch file?
A text file that stores a series of commands
What does the cpmmand CAT do in linux cli?
Displays the contents of a text file on the screen. For example, to view the contents of the widget.txt file, you would enter cat widget.txt at the shell prompt.
What does the command less do linux
Displays the contents of a text file on the screen, pausing the output one screen at a time. For example, to view the contents of the widget.txt file one page at a time, you would enter less widget.txt at the shell prompt.
What does the command HEAD do in linux?
Displays the first few lines of a text file on the screen. For example, to view the first lines of the widget.txt file, you would enter head widget.txt at the shell prompt.
What does the command TAIL do in linux?
Displays the last few lines of a text file on the screen. For example, to view the last lines of the widget.txt file, you would enter tail widget.txt at the shell prompt.
What does the command su do in linux?
Allows you to switch user accounts.
What command do you use to turn off the computer in linux
su shutdown
How do you display the ipaddress in linux
ifconfig
What command removes files in linux
rm
What does the command dism do
Goes online and compares your system files to what is stored online for any problems
how do you remove a program in linux?
apt-get remove
How do you remove a folder through the cli on windows?
rd
How do you move files in linux command line
mv