099-103.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 158 行
HTML
158 行
<HTML>
<HEAD>
<TITLE>Linux Configuration and Installation:Installing Linux</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=1558285660//-->
<!--TITLE=Linux Configuration and Installation//-->
<!--AUTHOR=Patrick Volkerding//-->
<!--AUTHOR=Kevin Reichard//-->
<!--AUTHOR=Eric Foster//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=2//-->
<!--PAGES=099-103//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="095-099.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="103-106.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H3><A NAME="Heading25"></A><FONT COLOR="#000077">Booting the System</FONT></H3>
<P>After Linux has been installed, go ahead and reboot. If you’ve installed LILO, you’ll see it appear after the PC runs through its BIOS check. As Linux boots, you’ll see a long Linux-related diagnostic, as Linux checks the system and makes sure everything is where it’s supposed to be. For the most part, you can ignore any errors messages you see here (such as a proclamation that the name of the machine <I>darkstar</I> does not appear to be supported). After all the diagnostics, you’ll finally be presented with a command prompt:</P>
<!-- CODE SNIP //-->
<PRE>
Welcome to Linux 2.0.29.
darkstar login:
</PRE>
<!-- END CODE SNIP //-->
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B>If you installed networking capabilities when you installed Slackware96, you were asked the name of your machine. This name should appear in the place of <I>darkstar</I>.<HR></FONT>
</BLOCKQUOTE>
<P>Because there are no users on the system, you’ll login as the root user, so go ahead and type in <B>root</B> as the login. There will be no prompting for a password.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B>The <I>root user</I> is the supreme being on a UNIX system. Most of the traditional security tools within the UNIX operating system don’t apply to the root user—when logged in as <B>root</B>, you can do just about anything. It’s generally not a good idea to use the UNIX system as the root user, however; the proscribed practice is to set up your own account and then save the root login only for those times when you’re performing system administration.<HR></FONT>
</BLOCKQUOTE>
<P>After you’re logged in, you’ll see the following command prompt:
</P>
<!-- CODE SNIP //-->
<PRE>
darkstar:~#
</PRE>
<!-- END CODE SNIP //-->
<P>A <I>command prompt</I> is where you enter commands into the UNIX system. Your first commands will be to change your machine name and to set up a user account for yourself.</P>
<H4 ALIGN="LEFT"><A NAME="Heading26"></A><FONT COLOR="#000077">Adding Users</FONT></H4>
<P>Your first action as the Linux supreme being is to set up an account for your daily usage. To do this, type the following at the command prompt:
</P>
<!-- CODE SNIP //-->
<PRE>
darkstar:~# adduser
Login name for new user (8 characters or less) []: kevinr
</PRE>
<!-- END CODE SNIP //-->
<P>The <B>adduser</B> command does exactly what it says: adds a new user to the system. In the previous example, the user <I>kevinr</I> has been added to the system. After specifying the username, you’ll be asked additional information about the preferences of that user. Unless you’re familiar with Linux, you’ll want to stick with the defaults for now. (The defaults will be listed in brackets. Wherever there’s a default, you can go ahead and hit the <B>Enter</B> key instead of typing in the default selection. In our example, we’ll type in the defaults.) The entire sequence will look something like this:</P>
<!-- CODE //-->
<PRE>
User id for kevinr [defaults to next avaliable]:
Initial group for kevinr [users]: users
Additional groups for kevinr []:
kevinr’s home directory [/home/kevinr]: /home/kevinr
kevinr’s shell [/bin/bash]: /bin/bash
kevnir’s account expiry date (MM/DD/YY) []:
OK, I’m about to make a new account. Here’s what you entered so far.
New login name: kevinr
New UID: [Next available]
Initial group: users
Additional groups: [none]
Home directory: /home/kevinr
Shell: bin/bash
Expiry date: [no expiration]
This is it...if you want to bail out, hit Control-C. Otherwise,
press ENTER and go ahead and make the new account.
Making new account:
Changing the user information for kevinr
Enter the new value, or press return for the default
Full Name []: Kevin Reichard
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Changing password for kevinr
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
New password: <new password1>
Re-enter new password: <new password1>
Password changed.
Done...
</PRE>
<!-- END CODE //-->
<P>If you’re not planning on using Linux for anything but a single-user operating system, you don’t need to worry about things like group ID and UID (which is short for <I>user ID</I>). And even if you do plan on using Linux on a network, you can change these parameters later.</P>
<P>Additionally, you probably noticed that the name <I>darkstar</I> appears as the name of your machine. You probably don’t want to leave this as the name of your machine, so you should change it right off the bat. This name is contained in the file <B>/etc/HOSTNAME</B>, and the default is <B>darkstar.frop.org</B>. To change it, you’ll use a text editor (in the example, we’ll use <B>vi</B>) and edit this file. To load the <B>vi</B> text editor and the <B>/etc/HOSTNAME</B> file, use the following command line:</P>
<!-- CODE SNIP //-->
<PRE>
darkstar:~# vi /etc/HOSTNAME
</PRE>
<!-- END CODE SNIP //-->
<P>You’ll see a screen like the one in Figure 2.4.
</P>
<P><A NAME="Fig1"></A><A HREF="javascript:displayWindow('images/02-01.jpg',500,296 )"><IMG SRC="images/02-01t.jpg"></A>
<BR><A HREF="javascript:displayWindow('images/02-01.jpg',500,296)"><FONT COLOR="#000077"><B>Figure 2.4</B></FONT></A> Editing the <B>/etc/HOSTNAME</B> file.
</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B>You may have to make further changes if you’re on a TCP/IP network. For now, you can change the name to anything you’d like.<HR></FONT>
</BLOCKQUOTE>
<P>You’ll want to edit this file, changing <I>darkstar.frop.org</I> to whatever you’d like. If you’ve never used the <B>vi</B> or <B>elvis</B> text editor, skip ahead to Chapter 4 for a short tutorial.</P>
<P>If your system is configured properly, you should have the following directories in your root directory:</P>
<!-- CODE SNIP //-->
<PRE>
bin/ dev/ home/ mnt/ sbin/ var/
boot/ dos/ lib/ proc/ tmp/
cdrom/ etc/ lost+found/ root/ usr/
</PRE>
<!-- END CODE SNIP //-->
<P>If you’ve installed Slackware from the CD-ROM, and then the system refuses to see the drive when you reboot, you’ll need to install a new kernel or add the support through loadable kernel modules.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="095-099.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="103-106.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?