rev |
line source |
pankso@7
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
pankso@7
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
pankso@7
|
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
pankso@7
|
4 <head>
|
pankso@7
|
5 <title>SliTaz Handbook (en) - System administration</title>
|
pankso@7
|
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
|
pankso@7
|
7 <meta name="description" content="slitaz English handbook" />
|
pankso@7
|
8 <meta name="expires" content="never" />
|
pankso@7
|
9 <meta name="modified" content="2008-02-26 21:30:00" />
|
pankso@7
|
10 <meta name="publisher" content="www.slitaz.org" />
|
pankso@7
|
11 <meta name="author" content="Christophe Lincoln"/>
|
pankso@7
|
12 <link rel="shortcut icon" href="favicon.ico" />
|
pankso@7
|
13 <link rel="stylesheet" type="text/css" href="book.css" />
|
pankso@7
|
14 </head>
|
pankso@7
|
15 <body bgcolor="#ffffff">
|
pankso@7
|
16
|
pankso@7
|
17 <!-- Header and quick navigation -->
|
pankso@7
|
18 <div id="header">
|
pankso@7
|
19 <div align="right" id="quicknav">
|
pankso@7
|
20 <a name="top"></a>
|
pankso@7
|
21 <a href="x-window.html">X Window System</a> |
|
pankso@7
|
22 <a href="index.html">Table of contents</a>
|
pankso@7
|
23 </div>
|
pankso@7
|
24 <h1><font color="#3E1220">SliTaz Handbook (en)</font></h1>
|
pankso@7
|
25 </div>
|
pankso@7
|
26
|
pankso@7
|
27 <!-- Content. -->
|
pankso@7
|
28 <div id="content">
|
pankso@7
|
29 <div class="content-right"></div>
|
pankso@7
|
30
|
pankso@7
|
31 <h2><font color="#df8f06">System administration</font></h2>
|
pankso@7
|
32
|
pankso@7
|
33 <ul>
|
pankso@7
|
34 <li><a href="#network">Network configuration.</a></li>
|
pankso@7
|
35 <li><a href="#devices">Devices and disks access.</a></li>
|
pankso@7
|
36 <li><a href="#users-admin">Users, groups and passwords.</a></li>
|
pankso@7
|
37 <li><a href="#locale">Language and keyboard.</a></li>
|
pankso@7
|
38 <li><a href="#bash">Install the Bash shell</a></li>
|
pankso@7
|
39 <li><a href="#time">Set the system time</a></li>
|
pankso@7
|
40 </ul>
|
pankso@7
|
41
|
pankso@7
|
42 <a name="network"></a>
|
pankso@7
|
43 <h3>Network configuration</h3>
|
pankso@7
|
44 <p>
|
pankso@7
|
45 By default SliTaz starts a DHCP client (udhcpc) on eth0 at boot time. If your
|
pankso@7
|
46 network card has been identified as an <code>eth0</code> interface and you use
|
pankso@7
|
47 a router, your connection should already be working. DHCP is dynamically
|
pankso@7
|
48 configured, on each boot the client asks for a new IP address from
|
pankso@7
|
49 the DHCP server, which is integrated into the router, or on another computer.
|
pankso@7
|
50 If you need a static IP, you can directly edit config files or use the GUI
|
pankso@7
|
51 <code>netbox</code> available from JWM menu --> System tools. In a terminal
|
pankso@7
|
52 or a Linux console, you can list all available network interfaces with the
|
pankso@7
|
53 command <code>ifconfig</code> followed by the <code>-a</code> option:
|
pankso@7
|
54 </p>
|
pankso@7
|
55 <pre>
|
pankso@7
|
56 $ ifconfig -a
|
pankso@7
|
57 </pre>
|
pankso@7
|
58 <p>
|
pankso@7
|
59 The system wide network configuration file is <code>/etc/network.conf</code>,
|
pankso@7
|
60 it can be graphically configured with <code>netbox</code> or directly edited by
|
pankso@7
|
61 the root administrator.
|
pankso@7
|
62 </p>
|
pankso@7
|
63 <h4>Install network card driver</h4>
|
pankso@7
|
64 <p>
|
pankso@7
|
65 In case you need a network card driver and dont know the driver name, you can
|
pankso@7
|
66 use the command <code>lspci</code> to find your card and then <code>modprobe</code>
|
pankso@7
|
67 to load a module. In Live mode you can use the SliTaz boot option
|
pankso@7
|
68 <code>modprobe=modules</code> to automatically load Kernel modules. To get a
|
pankso@7
|
69 list of all available network card drivers, display PCI eth cards and load a
|
pankso@7
|
70 module:
|
pankso@7
|
71 </p>
|
pankso@7
|
72 <pre>
|
pankso@7
|
73 # modprobe -l | grep drivers/net
|
pankso@7
|
74 # lspci | grep [Ee]th
|
pankso@7
|
75 # modprobe -v module_name
|
pankso@7
|
76 </pre>
|
pankso@7
|
77 <p>
|
pankso@7
|
78 On an installed system you just need to add the module_name to the variable
|
pankso@7
|
79 <code>LOAD_MODULES </code> in <code>/etc/rcS.conf</code> to load your module
|
pankso@7
|
80 on each boot.
|
pankso@7
|
81 </p>
|
pankso@7
|
82
|
pankso@7
|
83 <a name="devices"></a>
|
pankso@7
|
84 <h3>Devices and disks access</h3>
|
pankso@7
|
85 <p>
|
pankso@7
|
86 With Linux your disks and USB media are seen as devices. To access them you must
|
pankso@7
|
87 first mount a device on a mount point (directory). On SliTaz you can graphically
|
pankso@7
|
88 mount devices using <code>mountbox</code> or use the command line. To mount the
|
pankso@7
|
89 first disk of a local hard disk on <code>/mnt/disk</code>:
|
pankso@7
|
90 </p>
|
pankso@7
|
91 <pre>
|
pankso@7
|
92 # mkdir -p /mnt/disk
|
pankso@7
|
93 # mount /dev/hda1 /mnt/disk
|
pankso@7
|
94 </pre>
|
pankso@7
|
95 <p>
|
pankso@7
|
96 To mount a cdrom or an USB media you should use mount points located in
|
pankso@7
|
97 <code>/media</code>. Note that for a cdrom, you just have to specify
|
pankso@7
|
98 the device path and for a flash key the mount point already exists:
|
pankso@7
|
99 </p>
|
pankso@7
|
100 <pre>
|
pankso@7
|
101 # mount /dev/cdrom
|
pankso@7
|
102 # mount /dev/sda1 /media/flash
|
pankso@7
|
103 </pre>
|
pankso@7
|
104 <h4>ntfs filesystem</h4>
|
pankso@7
|
105 <p>
|
pankso@7
|
106 If you need read/write access to Windows ntfs filesystems you must install a
|
pankso@7
|
107 few additional packages from the mirror. The <code>ntfs-3g</code> driver
|
pankso@7
|
108 provides stable access to ntfs partitions and the <code>ntfsprogs</code> provides
|
pankso@7
|
109 manipulation tools dependent on Fuse. Note that you can format, move or resize
|
pankso@7
|
110 ntfs partitions graphically with Gparted.
|
pankso@7
|
111 </p>
|
pankso@7
|
112
|
pankso@7
|
113 <a name="users-admin"></a>
|
pankso@7
|
114 <h3>Users, groups and passwords</h3>
|
pankso@7
|
115 <p>
|
pankso@7
|
116 To manage users and groups on your SliTaz system you must use the command line,
|
pankso@7
|
117 but file permissions can be changed graphically using the emelFM2 file manager. To
|
pankso@7
|
118 add or remove users and groups you must be root. Root can also change all
|
pankso@7
|
119 user passwords and a single user can only change his/her own password. To add
|
pankso@7
|
120 or remove a user named linux:
|
pankso@7
|
121 </p>
|
pankso@7
|
122 <pre> # adduser linux
|
pankso@7
|
123 # deluser linux
|
pankso@7
|
124 </pre>
|
pankso@7
|
125 <p>
|
pankso@7
|
126 To add or remove a group you must use <code>addgroup</code> or
|
pankso@7
|
127 <code>delgroup</code>. To change the current user password or change the
|
pankso@7
|
128 password of a specific user, you must use the command <code>passwd</code>:
|
pankso@7
|
129 </p>
|
pankso@7
|
130 <pre> $ passwd
|
pankso@7
|
131 # passwd username
|
pankso@7
|
132 </pre>
|
pankso@7
|
133
|
pankso@7
|
134 <a name="locale"></a>
|
pankso@7
|
135 <h3>Language and keyboard layout</h3>
|
pankso@7
|
136 <p>
|
pankso@7
|
137 SliTaz saves the configuration of the default locale in <code>/etc/locale.conf</code>
|
pankso@7
|
138 which is read by <code>/etc/profile</code> on each login and the keyboard
|
pankso@7
|
139 setting is stored in <code>/etc/kmap.conf</code>. These two files can be
|
pankso@7
|
140 edited with your favorite editor or configured respectively with
|
pankso@7
|
141 <code>tazlocale</code> and <code>tazkmap</code>. You can modify the settings
|
pankso@7
|
142 you chose on the first boot by typing as root administrator:
|
pankso@7
|
143 </p>
|
pankso@7
|
144 <pre>
|
pankso@7
|
145 # tazlocale
|
pankso@7
|
146 Or:
|
pankso@7
|
147 # tazkmap
|
pankso@7
|
148 </pre>
|
pankso@7
|
149 <p>
|
pankso@7
|
150 To check all available locales or your current configuration you can use the
|
pankso@7
|
151 command <code>locale</code> as a single user or root (C for English):
|
pankso@7
|
152 </p>
|
pankso@7
|
153 <pre> $ locale -a
|
pankso@7
|
154 $ locale
|
pankso@7
|
155 </pre>
|
pankso@7
|
156 <a name="bash"></a>
|
pankso@7
|
157 <h3>Bash Shell</h3>
|
pankso@7
|
158 <p>
|
pankso@7
|
159 On SliTaz you have the ash and sh shell with a link to Ash, this shell is
|
pankso@7
|
160 provided by Busybox. If you wish to use the Bash (Bourne Again SHell), first
|
pankso@7
|
161 as <code>su</code> install bash, copy the <code>.profile</code> found in your
|
pankso@7
|
162 home directory and rename it <code>.bashrc</code>, then edit the
|
pankso@7
|
163 <code>/etc/passwd</code> file with your favorite text editor and change your
|
pankso@7
|
164 shell to :/bin/bash
|
pankso@7
|
165 </p>
|
pankso@7
|
166 <pre>
|
pankso@7
|
167 # tazpkg get-install bash
|
pankso@7
|
168 # cp /home/hacker/.profile home/hacker/.bashrc
|
pankso@7
|
169 # Note root user: cp /home/hacker/.profile ~/.bashrc
|
pankso@7
|
170 # nano /etc/passwd # :/bin/bash
|
pankso@7
|
171 </pre>
|
pankso@7
|
172 <p>
|
pankso@7
|
173 The next time you login bash will be your default shell, you can confirm this
|
pankso@7
|
174 by typing <code>env</code> in the command line.
|
pankso@7
|
175 </p>
|
pankso@7
|
176
|
pankso@7
|
177 <a name="time"></a>
|
pankso@7
|
178 <h3>System Time</h3>
|
pankso@7
|
179 <p>
|
pankso@7
|
180 To know the current system time, you can simply type <code>date</code>. On
|
pankso@7
|
181 SliTaz, the timezone configuration file is saved in <code>/etc/TZ</code>, you
|
pankso@7
|
182 can edit with your favorite text editor or simply <code>echo</code> the changes.
|
pankso@7
|
183 Here's an example using the timezone Europe/London:
|
pankso@7
|
184 </p>
|
pankso@7
|
185 <pre># echo "Europe/London" > /etc/TZ
|
pankso@7
|
186 </pre>
|
pankso@7
|
187 <h4>Rdate</h4>
|
pankso@7
|
188 <p>
|
pankso@7
|
189 To syncronize the system clock with a network time server, you can as the
|
pankso@7
|
190 <code>root</code> administrator use the <code>rdate -s</code> command:
|
pankso@7
|
191 </p>
|
pankso@7
|
192 <pre>
|
pankso@7
|
193 # rdate -s tick.grayware.com
|
pankso@7
|
194 </pre>
|
pankso@7
|
195 <p>
|
pankso@7
|
196 To display the time on the remote server, use the <code>rdate -p</code> command.
|
pankso@7
|
197 </p>
|
pankso@7
|
198 <pre>
|
pankso@7
|
199 $ rdate -p tick.grayware.com
|
pankso@7
|
200 </pre>
|
pankso@7
|
201 <h4>Hwclock</h4>
|
pankso@7
|
202 <p>
|
pankso@7
|
203 Hwclock allows you to syncronize the time of your hardware clock to the system
|
pankso@7
|
204 clock or vice versa.
|
pankso@7
|
205 </p>
|
pankso@7
|
206 <p>
|
pankso@7
|
207 Syncronize the system clock to the hardware clock ( --utc = universal time,
|
pankso@7
|
208 -l = local time):
|
pankso@7
|
209 </p>
|
pankso@7
|
210 <pre>
|
pankso@7
|
211 # hwclock -w --utc
|
pankso@7
|
212 </pre>
|
pankso@7
|
213 <p>
|
pankso@7
|
214 Syncronize the hardware clock to the system clock:
|
pankso@7
|
215 </p>
|
pankso@7
|
216 <pre>
|
pankso@7
|
217 # hwclock -s --utc
|
pankso@7
|
218 </pre>
|
pankso@7
|
219
|
pankso@7
|
220 <!-- End of content -->
|
pankso@7
|
221 </div>
|
pankso@7
|
222
|
pankso@7
|
223 <!-- Footer. -->
|
pankso@7
|
224 <div id="footer">
|
pankso@7
|
225 <div class="footer-right"></div>
|
pankso@7
|
226 <a href="#top">Top of the page</a> |
|
pankso@7
|
227 <a href="index.html">Table of contents</a>
|
pankso@7
|
228 </div>
|
pankso@7
|
229
|
pankso@7
|
230 <div id="copy">
|
pankso@7
|
231 Copyright © 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
|
pankso@7
|
232 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
|
pankso@7
|
233 Documentation is under
|
pankso@7
|
234 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
|
pankso@7
|
235 and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
|
pankso@7
|
236 </div>
|
pankso@7
|
237
|
pankso@7
|
238 </body>
|
pankso@7
|
239 </html>
|