Chapter 15: Working With The Command Line Interface - CompTIA A+ Certification All-in-One Exam Guide, Tenth Edition Flashcards

1
Q

List three reasons the command-line is popular.

A
  1. If you know what you are doing, you can do most jobs more quickly using the command line than with a graphical user interface.
  2. The command-line interface doesn’t take much operating system firepower, so it’s a natural choice for jobs where you don’t need a full-blown GUI for an OS.
  3. Text commands are easily added to scripts, enabling you to perform complex tasks automatically.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define a prompt

A

A character or message provided by an operating system or program to indicate it is ready to accept input.

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

Define a shell.

A

Tool that interprets command-line input, also known as a command-line interpreter.

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

What is a command?

A

A request, typed from a terminal or embedded in a file, to perform an operation or to execute a particular program.

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

What is bash?

A

Default command shell on macOS and most Linux distros.

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

How do access the CLI?

A

You can access the CLI through the Start menu or the Start screen’s Search bar. Type cmd from the Start screen then press enter when the Search option appears with the full command.

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

How do you close the CLI?

A

You can either click the Close box in the upper-right corner of the screen or type “exit” and press ENTER.

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

When will you be prompted “Windows needs your permission to continue.”

A

Whenever you attempt to enter a Windows command prompt command that requires elevated or administrative privileges.

You can manually run a command with elevated privileges by right-clicking on a command prompt shortcut and selecting “Run as an administrator” or if Windows prompts for an admin password or credentials, enter whatever is needed.

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

How do you create a shortcut to run the CLI with admin privileges?

A
  1. Right-click desktop and create a new shortcut.
  2. Enter cmd as the location and the name of the shortcut.
  3. Right-click the shortcut, select properties > Advanced > check “Run as Administrator.
  4. Click OK.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

MacOS and Linux are based off of what operating system?

A

UNIX

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

What is Terminal?

A

A command-line tool available in macOS and various Linux distros.

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

What is the name of the CLI in Ubuntu Linux?

A

Terminal.

Just like in macOS.

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

Name two other CLI emulators for Linux distros.

A

Konsole Terminal

GNOME Terminal

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

How do you launch the Terminal in macOS?

A
  1. Launch the Terminal app from the Utilities folder (located in the Applications folder).
  2. Activate Spotlight (COMMAND-SPACEBAR), type terminal, and press ENTER.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why is Spotlight so great on macOS?

A

It is a great search tool because it indexes your drives, not just your file names, but content.

This means you can search for specific files, but also apps, email messages, music, contacts and even flight information!

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

How do you open a terminal emulator in Linux (generally)?

A

Every Linux distro has some form of finder or search function on the desktop that works similarly to the search tools in macOS or Windows. Find this tool and type terminal and press ENTER to start the program. This will bring up the terminal window.

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

Define Linux command “su.”

A

Older Linux command for gaining root access.

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

Define Linux command “sudo.”

A

Linux command for gaining root access.

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

How do you run the CLI with advanced privileges, called “super user” or “root privileges.”

A

Whenever you need to run a command as root, type sudo followed by the desired command. (the system will prompt for a password and then run the command).

If the system doesn’t have sudo, it should have su. You will typically type su at the prompt and press ENTER; you will then be prompted for the root password. (When you have successfully entered the password, the prompt will change (usually changing the character at the end from a $ to a #) and every command you enter from then on will be executed as root.

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

How do you stop working as root?

A

Type “exit” and press ENTER while you are working in root. You will then return to the normal prompt.

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

Many Linux systems disable the root account for safety, rendering the ___ command inoperable. The ___ command enables users to do root things without having their root password.

A
  1. Su

2. Sudo

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

Define the working directory.

A

The current directory used by command-line commands unless they explicitly specify a target file or directory. The prompt usually indicates the working directory.

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

The command prompt focuses on a specific folder, the working directory, usually indicated by the prompt. What is an example of focus in Windows?

If you a prompt that looks like this line, you know that the focus is on the root directory of the C: drive.

A

C: >

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

How is the working directory naming protocol different in macOS and Linux as opposed to Windows? Name three ways.

A
  1. macOS and Linux don’t use the lettering concepts of drives like windows, as all forms of storage are mounted simply as folders.
  2. Linux prompts show the currently logged-on user and system as well as the current directory.
  3. MacOS and Linux use a forward slash (/) instead of a backslash ().
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How would the prompt display user mike is on the “server” system and is on the home directory in macOS or Linux?

A

mike@server:/home$

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

How would the prompt look in Windows, if the focus was on the \Diploma\APLUS\ folder of the C: drive?

A

C:\Diploma\APLUS>

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

The trick of using a command line is first to focus the prompt on the ____ and ____ where you want to work.

A

Drive, folder

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

How do you close the Terminal?

A

At the prompt, type exit and press ENTER.

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

The command line requires _________. That means you need to type commands, file names, and switches accurately. Otherwise, you get errors or no results at all.

A

Precision.

30
Q

Define file format.

A

How information is encoded in a file. Two primary types are binary (pictures) and ASCII (text), but within those are many formats, such as BMP and GIF for pictures. Commonly represented by a suffix (the file extension) at the end of the file name; for example, .txt for a text file or .exe for an executable.

31
Q

Define file extension.

A

Two, three, four, five, or more letters that follow a file name and identify the type of the file (file format). Common file extensions are .zip, .exe, .doc, .java, and .xhtml.

32
Q

In Windows, Hard drive partitions usually start with the letter _____.

A

C:

33
Q

Optical drives by default follow what lettering protocol?

A

The next available drive letter after the last hard drive partition.

34
Q

How else can you mount a hard drive in Windows?

A

As a volume in another drive.

35
Q

MacOS and Linux don’t use drive _______. Instead, the boot partition is defined as the __________, shown as a slash: /.

A

Lettering; root drive.

36
Q

All other storage on macOS or Linux distros—partitions, optical discs, thumb drives, etc.—must go through a process called ____ to enable the OS to treat them as folders. These folders are ____ to a single folder off the _____ called the ____ or _____ in Linux and _______ in macOS.

A

Mounting; mounted; root drive; /mount; /media; /Volumes.

37
Q

All operating systems use a _______ ________ ______ to organize the contents of these drives.

A

hierarchical directory tree

38
Q

All files are put into groups called folders. But many techs refer to them by the interchangeable term _____.

A

Directory

39
Q

Define root directory.

A

Directory that contains all other directories.

40
Q

Define sub folder.

A

A folder located inside another folder.

41
Q

Any file not in a folder within the tree—that is, any file in the folder at the root of the directory tree—is said to be in the _______.

A

Root directory.

42
Q

Can two files exist with the same name on one PC?

A

Yes, but two files with the same name can not exist in the same folder.

43
Q

Can two subfolders on one PC have the same name?

A

Yes, but two subfolders within the same folder cannot have the same name.

44
Q

Define path:

A

Route the OS must follow to find an executable program stored in a subfolder.

45
Q

How would you write the path for the test2.txt file located in the System subdirectory of the root directory Test within the C: drive?

A

C:\Test\System\test2.txt.

46
Q

C:\Program Files
C:\Users\mike\Desktop
C:\FRUSCH3\Clear
D:\

Are all examples of valid Windows ______.

A

Paths.

47
Q

Folder names in Linux and macOS use a _____ as opposed to Windows when separating folder names.

A

Forward slash /

48
Q

Which of the three main operating systems uses case sensitivity in paths?

A

Linux.

49
Q

Which OS could have a folder with two files named Mike and mike?

A

Linux

50
Q

/usr/local/bin
/Applications/Utilities
/home/mike/Desktop
/

Are all valid path names in which OS?

A

Linux and macOS.

51
Q

Within Linux and macOS, generally, your default prompt is pointing at the /home//folder. By default, these two OS do not show that path, but instead show a _____.

A

Tilde, ~

52
Q

Mike@server:~$ points to which path generally?

A

Mike@server:/home/mike

53
Q

Which command can you use in Linux and macOS to check your current path?

A

pwd

pwd shows you the working directory. The output includes the full path.

54
Q

What are the eleven disallowed Windows characters for files and folders?

A

*”/|[]:;|=,

55
Q

What is the only disallowed character in macOS and Linux file naming?

A

Forward slash /

56
Q

Files aren’t required to have _______, but in most cases the OS won’t know the file association type without one.

A

Extension.

57
Q

Exam tip!

A

Questions on the CompTIA A+ exam will couch questions in the forms of scenarios. “Given the scenario, which OS tool/command would be appropriate?”

58
Q

Define a switch.

A

Within networking, it is a device that filters and forwards traffic based on some criteria. A bridge and a router are both examples of switches. In a command line interface, a switch is a function that modifies the behavior of a command.

59
Q

Another name for a switch (in the CLI).

A

Option.

60
Q

The proper way to write a command is called its _____.

A

Syntax.

61
Q

What are two keys with commands?

A

You can’t spell anything incorrectly or use a \ when syntax calls for a /.

62
Q

The command line is almost completely ______. Meaning, you have to learn the correct ______ for each command.

A

Inflexible; syntax.

63
Q

What are two ways to generally write command syntax?

A

[command] [target (if any)] [switches]

Or

[command] [switches] [target (if any)]

64
Q

If you want to find out the syntax and switches used by a particular command, in Windows type the command followed by ____ to get help

A

/?

For example:

[command name] /?

65
Q

In macOS or Linux, type the command ____ (manual) followed by the command you’re interested in:

A

man [command name]

66
Q

How do you exit the manual? That is the help screen in CLI for identifying syntax and switches for commands in Linux and macOS.

A

Press the q key to quit back to the prompt.

67
Q

What is the system checklist for troubleshooting?

A
  1. Check all physical connections.
  2. Check hardware integrity.
  3. Restart.
  4. Check event viewers/logs.
  5. Uninstall and reinstall affected feature.
68
Q

What are the steps for analyzing symptoms?

A
  1. What controls this system feature or device?
  2. Does this only occur when an application is running?
  3. What is happening when this problem occurs?
  4. Has this ever happened before? If so, how frequently?
  5. Has anything been installed recently - hardware or software?
  6. What are the system specifications for this device or application? Does this system meet them?
69
Q

CompTIA’s Troubleshooting Process (6 steps)

A
  1. Identify the problem.
  2. Establish a theory of probable cause.
  3. Test the theory to determine cause.
  4. Establish a plan of action to resolve the problem and implement the solution.
  5. Verify full system functionality and, if applicable, implement preventative measures.
  6. Document findings, actions and outcomes.
70
Q

What causes the Blue Screen of Death? What is it?

A
Cause of kernel process error.
	kernel service
	device drivers
	Malfunctioning hardware
	kernel level root kits.

Windows Stop Error
Presents diagnostic information.

71
Q

Since ________, by default Windows restarts immediately after a Blue Screen of Death.

A

Vista.