15.01.2024 Views

CompTIA A+ Certification All-in-One Exam Guide

  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

shutdown <options> <time>

By far the most common time is now. To shut the system down

immediately, type this:

shutdown now

To restart the system, run shutdown with the –r option:

shutdown –r now

passwd

The passwd command enables you to change your password or, if logged in

as root (the super user), any user’s password. To change your own password,

type the following:

Scripting

Up until now, we’ve entered commands into the command prompt one by

one. Most of the time all you need is to enter one or two commands, but

sometimes you will find yourself repeating the same series of commands over

and over. When you find yourself in this situation, it might be a good idea to

write a script to run that series of commands. A script is a small program

used to help automate computing tasks.

In fact, you can make a super simple shell script by copying a few shell

commands to a new file and saving it. Wait, shell script and shell command?

When you work at the command line in Windows, you’re working at the

Command shell. Every time you type a Windows command at a prompt,

you’re using a shell command. You’ve been working with shell commands

this whole chapter!

Each command shell has its own shell scripting language, so the

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

Saved successfully!

Ooh no, something went wrong!