These days, many important tasks in Linux can be done from both graphical interfaces and from commands. However, the command line has always been, and still remains, the interface of choice for Linux power users.
Graphical user interfaces (GUIs) are meant to be intuitive. With some computer
experi- ence, you can probably figure out, for example, how to add a user, change the time and
date, and configure a sound card from a GUI. For these cases, we’ll mention which
graphical tool you could use for the job. For the following cases, however, you will probably need to rely on the command line:
❑ Almost any time something goes
wrong — Ask a question at an online forum to
solve some Linux problem you are having and the help you get will almost always come in the form of commands to run. Also,
command line tools typically offer
much more feedback if there is a problem
configuring a device or
accessing files and directories.
accessing files and directories.
❑ Remote systems administration — If you are administering a remote server, you may not have graphical tools available. Although remote GUI access (using X appli-
cations or VNC) and web-based administration tools may be available, they usually
run more slowly than what you can do from the command line.
❑ Features not supported by GUI — GUI administration tools tend to present the
most
basic ways of performing a task. More complex operations often require
options that are only available from the command line.
❑ GUI is broken or not installed — If no graphical interface is
available, or if the installed GUI isn’t working properly, you may be
forced to work from the com- mand line. Broken GUIs can happen for lots of reasons, such as when you use a third-party,
binary-only driver from NVIDIA or ATI and a kernel upgrade makes the driver
incompatible.
The bottom line is that to unlock the full power of your Linux system, you must be able
to
use shell commands. Thousands of commands are available
for Linux to monitor and
manage every aspect of your Linux system.
But whether you are a Linux guru or
novice, one challenge looms large.
How do you remember the most
critical commands and options you need, when a command shell might only show
you this:
$
NOTE Most other versions of Linux, as well as Unix, define the default com- mand prompt as a dollar sign, $, (with the root user prompt #).
SUSE, however, defines the default command prompt as a greater-than
sign (>), but follows the convention of a pound sign (#) for the root user. Throughout this book, you’ll
see
$ for
the shell prompt for commands that can be run as any user (no special
privilege required).
You can change your prompt from
the default > by
using a command like the following:
> export
PS1=”[\u@\h
\w]\\$ “ [ericfj@Brodgar ~]$
This command
sets the prompt to your username, @ the current hostname,
with
the current working directory, all in square brackets, followed by a more traditional
$ prompt. See Chapter 3 to learn how to set
this prompt for all shells by
placing
this command
inside a bash startup script file.
SUSE
Linux Toolbox is
not just another command reference or rehash of man pages.
Instead, this book presents commands in SUSE Linux by the way you use them. In
other words, instead of listing
commands alphabetically, we group commands for working with file systems,
connecting to networks, and managing processes in their
own
sections, so you can access commands by what you want to do, not only by how
they’re named.
No comments:
Post a Comment