📄 rhl06.htm
字号:
<HTML>
<HEAD>
<TITLE>Red Hat Linux Unleashed rhl06.htm </TITLE>
<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm">
<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/htindex.htm">
<LINK REL="Next" HREF="rhl07.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl07.htm">
<LINK REL="Previous" HREF="rhl05.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl05.htm"></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<A NAME="I0"></A>
<H2>Red Hat Linux Unleashed rhl06.htm</H2>
<P ALIGN=LEFT>
<A HREF="rhl05.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl05.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>
<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>
<A HREF="rhl07.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl07.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<UL>
<LI>
<A HREF="#E68E34" >Starting (and Stopping!) Your Linux System</A>
<UL>
<LI>
<A HREF="#E69E35" >What's This About Logging In?</A>
<LI>
<A HREF="#E69E36" >Why You Shouldn't Use the root Login</A>
<LI>
<A HREF="#E69E37" >Your First Login</A></UL>
<LI>
<A HREF="#E68E35" >Passwords</A>
<LI>
<A HREF="#E68E36" >Creating a New Login</A>
<LI>
<A HREF="#E68E37" >Logging Out</A>
<LI>
<A HREF="#E68E38" >Trying Out Your New Login</A>
<UL>
<LI>
<A HREF="#E69E38" >Linux Error Messages</A>
<LI>
<A HREF="#E69E39" >Search Paths</A></UL>
<LI>
<A HREF="#E68E39" >Virtual Terminals</A>
<LI>
<A HREF="#E68E40" >Commands and Programs</A>
<LI>
<A HREF="#E68E41" >Summary</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E66E6"></A>
<H1 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>6</B></FONT></CENTER></H1>
<BR>
<A NAME="E67E6"></A>
<H2 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>Getting Started with Linux</B></FONT></CENTER></H2>
<BR>
<P>Congratulations! Now that you have successfully installed Linux, you can start using it. In this chapter we will look at the steps you need to take to begin working with Linux, including the following:
<BR>
<UL>
<LI>Starting and stopping Linux
<BR>
<BR>
<LI>Logging in and out
<BR>
<BR>
<LI>Creating a new user with adduser
<BR>
<BR>
<LI>Changing your password
<BR>
<BR>
<LI>Using virtual terminals
<BR>
<BR>
<LI>Displaying system users with who
<BR>
<BR>
</UL>
<BR>
<A NAME="E68E34"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Starting (and Stopping!) Your Linux System</B></FONT></CENTER></H3>
<BR>
<P>Depending on the setup you chose during Linux installation and configuration, either Linux starts automatically when you power on your computer, or it requires you to type something (such as Linux) to specify that you want to boot Linux.
<BR>
<P>As your Linux system starts up, you see quite a few Linux initialization messages scroll through your screen. When Linux has completed its startup, you should see the following prompt:
<BR>
<PRE>
<FONT COLOR="#000080">Welcome to Linux 1.2.13.
darkstar login:</FONT></PRE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>A Linux system must always be shut down properly. Improper shutdown, such as simply turning off your system, can cause serious damage to your Linux system! When you are finished using your Linux system, you must shut it down properly, as described in
the next section. If you start to boot Linux, and then change your mind, you should let the system start up fully and then follow the shutdown procedure.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Because you know how to start Linux, it's even more important to know how to shut it down properly. Like many UNIX systems, if Linux is not powered down properly, damage to files can result. The easiest way to ensure a proper shutdown is to press the
Ctrl, Alt, and Delete keys simultaneously. (This is the famous Ctrl-Alt-Delete "three-finger salute" used in DOS.)
<BR>
<P>Pressing Ctrl-Alt-Delete causes a number of advisory messages and Linux shutdown messages to be displayed. You must wait until the Linux shutdown procedure has finished, at which point your monitor shows the initial "power-on" screen, before
turning your computer off.
<BR>
<BR>
<A NAME="E69E35"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>What's This About Logging In?</B></FONT></CENTER></H4>
<BR>
<P>Linux waits for a login. A login is simply the name that you supply to Linux to identify yourself to the operating system. Linux keeps track of which names are permitted to log in or access the system, and only allows valid users to have access.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>If you supplied a name to your system when installing Linux, the system name is used at the prompt. In the login shown earlier, the system has been called darkstar. The system name enables you to identify your machine to others when using networks or
modem connections. Don't worry if you didn't name your system yet, because you can change the system's name at any time.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Every login name on the system is unique. Normally, a password is assigned to each login, too. This secret password is like the identification number you use with your bank card to prove that you really are who you say you are. Also, the things you can
do with your login—the login's privileges—are controlled by Linux; different logins have different levels of privileges.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Usually, login names reflect a person's real name. Although you can't have two identically named logins on your system, you can easily create logins for users with the same (real) name by having one or two characters different. So, for example, the
login names suej and suek are treated by Linux as completely separate logins.
<BR>Conversely, there is no reason that one human being (for instance, yourself) can't have two, three, or a dozen login names. In fact, because you will be the system administrator of your Linux system, you will have one or more administrative logins, and
one or more regular user logins.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>At the login prompt, try typing your name, your dog's name, or any other random name that occurs to you. None of these are valid logins (at least not yet). The system asks you for a password; it won't matter what you type, so just press Enter or type a
random string of characters. Because the logins are not valid on the system, Linux won't let you in. It displays the message Login incorrect to tell you that either the name or the password you entered is not valid.
<BR>
<P>The only valid login on your Linux system after installation is the most powerful and dangerous login Linux offers: root. In the section "Creating a New Login," later in this chapter, we will create a safe login for you to use. This login can
have your name, your dog's name, or whatever else you choose.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>The login prompt is actually produced by a program called login whose only task is to accept your user ID and password, verify it, and then display a message preventing your access or letting you through to the next program that starts your user
session.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BR>
<A NAME="E69E36"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Why You Shouldn't Use the root Login</B></FONT></CENTER></H4>
<BR>
<P>You will have to use the root login from time to time. Some things simply cannot be done on the Linux system without logging in as root. You should not, however, use the root login as your regular login. This is especially true if you are exploring the
system, poking around, and trying out new commands that may not do what you thought they would!
<BR>
<P>Linux, as you already know, is a multiuser, multitasking operating system. Multiuser means that several people can be using Linux at the same time (of course, you have to add some additional terminals to your system, or it will get very crowded around
the keyboard). Multitasking means that Linux can do more than one thing at a time. For example, you can spell-check a document while downloading information from some remote system. (Multiuser implies multitasking, because all users must be able to do
their own work at the same time.) Linux, therefore, is very good at juggling all these tasks, keeping them from interfering with each other, and providing safeguards so that you cannot damage the system or another user's work.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>The root login does not restrict you in any way. With one simple command, issued either on purpose or by accident, you can destroy your entire Linux installation. For this reason, use the root login only when necessary. Avoid experimenting with
commands when you do log in as root.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>When you log in as root, you become the system. The root login is also sometimes called the superuser login, and with good reason. To use an analogy, instead of being a passenger on an airplane, you suddenly have all the privileges of the flight crew,
the mechanics, and the cabin crew. "Hmm, what does this do?" becomes an extremely dangerous phrase when logged in as root.
<BR>
<P>One of the oldest stories in UNIX lore tells of new users who log in as root and, in ten keystrokes, destroy their system completely and irrevocably. But if you're careful to follow the steps given here, and stop and take a moment to think about the
commands you are giving, none of the "How many new users does it take to nuke a system?" jokes will apply to you!
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>System administrator is another term you will see often. A system administrator is the actual person who sets up and maintains the Linux system. The amount of work involved in system administration varies from system to system. A full-time system
administrator may be required in an office for powerful machines that have many users, peripheral units such as printers and tape drives, and are connected to a network. Your Linux system will not require that level of dedication!</NOTE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -