Upgrade to remove ads
Ch. 16: Working with the Command-Line Interface
Terms in this set (114)
What is the command-line interface?
(CLI) A simple text based user interface for an OS.
What are the benefits of the Command-line Interface (CLI)?
It doesn't take too much OS power, can allow you to work quicker than if using a GUI, and text commands take very little bandwidth when sent across the network.
What is a command prompt?
Text prompt for entering commands.
How does a command-line interface work?
A prompt is displayed. You type a command and press enter. The computer executes the command and displays a new prompt, meaning it's ready for new instructions.
What is a prompt?
A specific set of characters within the command-line interface.
What is the command-line interpreter? And what is it also known as?
Also known as the shell, it's the tool that interprets the input of the command line.
What is the name of the default Windows shell?
What is the name of the default shell on the Mac OS X and Linux distros?
What is the difference between the GUI and a Shell?
The OS can only have one GUI, but it can interface with different shells.
What could you replace the bash with in Mac OS X and Linux?
Z shell (zsh), Korn shell (ksh), and C shell (csh).
What can you replace cmd.exe with in Window?
How do you access the command-line interface in Windows Vista and 7?
Type cmd into the start menu.
How do you access the command-line interface in Windows 8/8.1/10?
Type cmd into the search bar. The search charm will appear with the full command.
What is the best way to close the command-line interface (CLI)?
Type exit and press enter.
What happens when you attempt to enter a command into the command prompt that requires elevated or administrative privileges?
You'll receive a UAC dialog box (windows needs your permission to continue).
How do you run a command with elevated privileges?
Right-click a command-prompt shortcut and select "Run as administrator".
If prompted for administrator password or credentials, enter what's needed.
How do you create a shortcut to a Windows command prompt with elevated priviliges?
Right-click on the desktop and select New | Shortcut. Type cmd for the location and click next. Name the shortcut and click finish.
What is the command-line interface in Mac OS X and Ubuntu Linux referred to?
Terminal (Linux also uses console and gnome-terminal)
How do you open the Terminal in Mac OS X?
Launch it from the Utilities folder (within the Applications folder).
You can also use Spotlight (command-spacebar), type terminal, and press enter.
What is the general way of opening the Terminal within Linux?
Use the finder or search function to type in "terminal".
Both Mac OS X and Linux give you the ability to run the command line with what?
Advanced privileges called super user or root privileges.
Run the commands Su and Sudo to accomplish this.
What do su and sudo accomplish in the terminal?
Sudo runs a command as root, prompting for a password and then running the command.
Su will prompt you for the root password, afterwards executing every command as root.
What is the working directory?
The folder that the command prompt is focused on.
What is the difference between the Mac OS X/Linux prompts and the Windows?
First, they don't use Windows' drive letter concept, instead mounting storage as folders. Second, Linux shows the current logged-in user, system, and current directory. Third, Mac OS X and Linux use a forward slash (/) instead of a backwards (\)
How do you close the command prompt?
What is a file association?
The program a file uses according to it's extension.
What is a file extension?
Letters that follow a file name and identify the file type.
What is mounting?
A process where storage folders are mounted to a single folder on the root drive.
Called " /mount" or " /media" in Linux and " /Volumes" in Mac OS X.
What is a root directory?
The folder at the root of the directory tree
What is a subfolder?
A folder within a folder.
Two or more files with the same name __________ exist in different folders, but two files in the same folder ___________have the same name.
Two subfolders under the same folder _________ have the same name, but two subfolders under different folders ___________ have the same name.
What is the location of a file known as?
Windows and Mac OS X are not ______________, while Linux is.
What is an example of a Windows path?
What is an example of a Linux/Mac OS X path?
What's the difference between folder locations in Windows and folder locations in Mac OS X and Linux?
Windows uses the format "/home/<username>/folder", while Mac OS X and Linux show a tilde (~) as a stand-in for the users folder.
ex: mike@server :~
What is the pwd command?
A command within Mac OS X and Linux that tells you where you are in the directory.
What is a switch?
An extra letter or number typed into the command-line to call up a modification.
Also known as an option.
What is syntax?
The proper way to write a command
How do you look up a command in Windows?
type "[command name] /?"
also known as help
How do you look up a command in Mac OS X/Linux?
type "man [command name]"
What key do you press to exit back to the prompt in Mac OS X/Linux?
What is the Windows command that shows the contents of the working directory?
What Mac OS X/Linux command shows the contents of the working directory?
What command pauses text in Mac OS X/Linux?
ls | more
What is the pipe command?
A command that uses the | symbol to send or "pipe" output from one command to another
What information does the "dir " command list for files?
creation date, time, file size in bytes, filename, and extension
What information does the "dir" command list for folders?
creation date, creation time, <DIR>, and the folder name
What does the "dir /?" command do?
lists all possible switches for the command
What does the "dir /w" command do?
uses wide list format (shows only file names, but arranged in five columns)
What is the "ls -l" command in Linux?
long list, gives detailed info about all files.
What will typing "help" into the command prompt do?
shows a list of commands you may type.
What does the "cd" command do?
Changes the focus to a different directory.
To use, type "cd" followed by the desired directory.
What does the "cd \" command do?
Return you to the root directory.
What's the difference between an absolute path and a relative path?
Absolute paths type out the entire name of the directory, while Relative paths don't.
Within Windows, how do you switch to another drive in the command line?
type the drive letter followed by a colon.
Within Mac OS X, how do you switch drives in the command line?
Search in the /Volumes folder
How do you switch drives in the command line for Ubuntu Linux?
Search in the "/mnt" folder for drives, and the "/media/<users name>" folder for removable media
What is the md/mkdir command?
Creates a new directory
(md for Windows, mkdir for Windows/Mac OS X/Linux)
What is the rd/rmdir command?
Deletes a directory
(rd for Window, rmdir for Window/Mac OS X/Linux)
What command is used to delete directories that contain files in Windows?
What command is used to delete directories that contain files in Linux?
What does the dir /p command do?
Allows you to see files one page at a time.
What is the only time you can use a "/" in Windows command line?
When using a switch command.
How do you run a program in the command line for Windows?
search for the directory that holds the program and simply type its name.
How do you run a program in the command line for Linux?
type "./" in front of the executable file.
What are the two types of executable files/programs within Mac OS X and Linux?
built-in and executable
What are built-in programs?
Basic command-line commands such as ls, mkdir, and rm.
What are executable programs?
Programs that have been downloaded from somewhere else.
What is a wildcard?
A character, usually (*) or (?), that replaces part of or an entire filename when looking for a specific type of file.
.txt' or 'dir a
also: in Linux, "ls s* -l" will bring up files starting with 's'.
What is the del/erase command?
Deletes files in Windows.
What is the rm command?
Deletes files in Mac OS X and Linux.
What is the only command-line command that will warn you of deleting a file?
Used to delete all files in a directory.
What is the copy and move command in Mac OS X/Linux?
cp (copy) and mv (move).
What are the commands used to copy and move files in Windows?
copy and move
What is the five step copy/move process?
1. Point the command prompt to the directory containing the files to be copied or moved.
2. Type copy or move (Windows), or cp or mv (Linux or Mac OS X) and a space.
3. Type the name(s) of the file(s) to be copied or moved (with or without wildcards) and a space.
4. Type the path of the new location for the file(s).
5. Press Enter.
What is the xcopy command?
Allows multiple directories to be copied at one using extra switches.
What is the /s switch in xcopy?
Tells xcopy to copy all sub-directories except for empty ones.
What is the /e switch in xcopy?
Tells xcopy to copy empty sub-directories.
How would a xcopy command look?
"xcopy c:\Logs e:\Logs /s"
(copies all files in the Logs directory from the c drive to the e drive)
What is the robocopy command?
(Robust File Copy) Used to copy files and directories across networks.
What are the benefits of robocopy?
It fully replicates the directory structure on the destination system, deletes anything not part of the copy, can copy encrypted files, and if interrupted will continue from where it stopped.
What does the robocopy syntax look like?
robocopy [source] [destination] [options] /mir
What is the /mir switch?
mirror (used in robocopy)
What command in Linux allows multiple files and subfolders within a folder to be copied to a new location?
What is the chkdsk command?
It scans, detects, and repairs file system issues and errors
Uses the switches /f and /r
What do the /f and r/ switches in chkdsk do?
/f attempts to fix file system related errors, while the /r switch attempt to find and fix bad sectors/clusters.
What does chkdsk need in order to run successfully?
Direct access to a drive. It must not be in use when you try to check it
What is the format command?
Allows you to format volumes from the command line.
can use the switches /q and /x
What do the /q switch and the /x switch in format do?
/q performs a quick format, and /x forces the volume to dismount.
What is the hostname command?
Shows the name of your computer.
What is the gpudate command?
Used to force a workstation to update to new group policies
What is the gpresult command?
Provides a quick overview of all security policies applied to a single user or computer.
What does the sfc command do?
(system file checker) scans, detects, and restores important windows system files, folders, and paths that have become corrupted.
What is the syntax for the sfc command?
What is the shutdown command?
Allows you to shut down or reboot a local or remote computer
uses the r/ switch
What is the r/ switch in the shutdown command?
Tell the computer to reboot
What does the F1 function in windows do?
It brings back the previous command one letter at a time.
What does the F3 function in windows do?
It brings back the entire command at once.
What is Powershell?
A replacement for Windows command-line, allow you to use the "Get-Children" command to find a file type as well as any mention of it in other documents.
Also uses cmdlets.
What is the ifconfig command in Mac OS X/Linux?
Allows you to view and change settings for your network connections.
What is the iwconfig command in Mac OS X/Linux?
Allows you to change wireless network settings
What is the ps command in Mac OS X/Linux?
Allows you to see the processes running on your system.
What is the grep command in Mac OS X/Linux?
Enables you to search through text file or command output to find specific information or filter out unneeded information
What is apt-get?
A command-line tool use by the APT (Advanced packaging tool) in Ubuntu to find and install applications.
Also manages the software on the system.
What is Vi?
The basic text editor in Mac OS X and Linux.
What is "insert mode" within the Vi editor?
Allows you to insert and edit text.
What is "command mode" within the Vi editor?
Allows you to give commands such as cut, paste, delete, and save.
What is the dd command within Mac OS X/Linux?
Primarily used to create exact, bit-by-bit image of any form of block storage.
Used for copying hard drives, backup, and disk wipes.
What is the syntax for the shutdown command in Mac OS X/Linux?
- Shutdown <options> <time>
- Shutdown now
- Shutdown -r now (will reboot)
What is the passwd command within Mac OS X and Linux?
Allows you to change your password or the password of other users if logged in as the root (super user).
In Mac OS X and Linux, what is the shorthand character that represents a user's home directory?
~ (known as a tilde)
What character identifies a command option, or "switch", in Linux?
THIS SET IS OFTEN IN FOLDERS WITH...
Ch. 17: Troubleshooting Operating Systems **
Ch. 18: Virtualization
Ch. 4: Microprocessors ***
Ch. 5: RAM ***
YOU MIGHT ALSO LIKE...
80 Technology terms
MIS Exam 2 Review
CA III Unit 1, 2
OTHER SETS BY THIS CREATOR
Chapter 28 - Key Terms
Chapter 27 - Key Terms
Chapter 26 - Key Terms
Chapter 25 - Key Terms