15.01.2024 Views

CompTIA A+ Certification All-in-One Exam Guide

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

We’ll discuss this output in more detail as we continue through the chapter.

Windows help screens sometimes seem a little cryptic and macOS and

Linux help screens are often impossibly hard to read. Still, they’re useful

when you’re not too familiar with a command or you can’t figure out how to

get a command to do what you need. Even though I have many commands

memorized, I still refer to these help screens; you should use them as well. If

you’re really lost, type help at the command prompt for a list of commands

you may type.

NOTE Extra text typed after a command to modify its operation, such as

/w or /p after dir, is called a switch. Almost all switches can be used

simultaneously to modify a command. For example, try typing ls –a –l –h in

macOS or Linux. With many commands, you can run multiple switches

together.

With the aforementioned ls, for example, ls –alh works just fine, with all

three switches applied.

Changing Directory Focus: The cd Command

The cd command works in every operating system, although there are

differences between Windows and macOS and Linux. You can use the cd

command to change the focus of the command prompt to a different

directory. To use the cd command, type cd followed by the name of the

directory on which you want the prompt to focus. For example, in Windows,

to go to the Obiwan directory in the root directory, you type cd \obiwan and

then press enter. If the system has an Obiwan directory there, the prompt

changes focus to that directory and appears as C:\Obiwan>. If no Obiwan

directory exists or if you accidentally type something like obiwam, you get

the error “The system cannot find the path specified.” If only I had a dollar

for every time I’ve seen those errors! I usually get them because I’ve typed

too fast. If you get this error, check what you typed and try again.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!