1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4
<!ENTITY % globalent SYSTEM "../../../libs/global.ent">
6
<!ENTITY % cdo-C SYSTEM "../../../libs/cdo-C.ent">
8
<!ENTITY % kde SYSTEM "../../libs/kde.ent">
10
<!ENTITY % kde-menus-C SYSTEM "../../libs/kde-menus-C.ent">
12
<!ENTITY % kde-general SYSTEM
13
"/usr/share/apps/ksgmltools2/customization/obsolete/general.entities">
15
<!ENTITY % xinclude SYSTEM "../../../libs/xinclude.mod">
17
<!ENTITY language "en">
19
<article id="basic-concepts" status="complete">
21
<title>Basic Concepts</title>
25
This chapter introduces you to basic concepts which are useful when getting
26
started with a Kubuntu system.
31
<!-- DIRECTORIES AND FILE SYSTEMS -->
32
<sect1 id="directories-file-systems" status="complete">
33
<title>Directories and File Systems</title>
36
In Linux and Unix everything is a file. Directories are files, files are files,
37
and devices are files. Devices are usually referred to as nodes; however, they
42
Linux and Unix file systems are organized in a hierarchical, tree-like
43
structure. The highest level of the file system is the <filename>/</filename>
44
or root directory. All other files and directories exist under the root
45
directory. For example, <filename>/home/konqi/kubuntu.odt</filename> shows
46
the correct full path, or absolute path, to the <filename>kubuntu.odt</filename>
47
file that exists in the <filename>konqi</filename> directory, which is under
48
the <filename>home</filename> directory, which in turn is under the root
49
(<filename>/</filename>) directory.
53
Underneath the root (<filename>/</filename>) directory is a set of important
54
directories common to most Linux distributions. The following is a listing of
55
common directories that are directly under the root (<filename>/</filename>)
60
<varlistentry><term><filename>/bin</filename></term>
63
Important commands, which historically have been <emphasis>bin</emphasis>ary,
64
but may also be shell scripts.
69
<varlistentry><term><filename>/boot</filename></term>
72
<emphasis>Boot</emphasis> configuration files, kernels, and other files needed
73
at <emphasis>boot</emphasis> time.
78
<varlistentry><term><filename>/dev</filename></term>
81
The <emphasis>dev</emphasis>ice files.
86
<varlistentry><term><filename>/etc</filename></term>
89
Configuration files, startup scripts, <emphasis>etc</emphasis>.
94
<varlistentry><term><filename>/home</filename></term>
97
<emphasis>Home</emphasis> directories for different users.
102
<varlistentry><term><filename>/initrd</filename></term>
105
Used when creating a customized <emphasis>init</emphasis>ial
106
<emphasis>R</emphasis>AM <emphasis>D</emphasis>isk.
111
<varlistentry><term><filename>/lib</filename></term>
114
System <emphasis>lib</emphasis>raries.
119
<varlistentry><term><filename>/lost+found</filename></term>
122
Provides a <emphasis>lost+found</emphasis> system for files that exist under the
123
root (<filename>/</filename>) directory.
128
<varlistentry><term><filename>/media</filename></term>
131
Automatically mounted (loaded) removable <emphasis>media</emphasis> such as CDs,
132
digital cameras, etc.
137
<varlistentry><term><filename>/mnt</filename></term>
140
Manually <emphasis>m</emphasis>ou<emphasis>nt</emphasis>ed filesystems on your
146
<varlistentry><term><filename>/opt</filename></term>
150
Provides a location for <emphasis>opt</emphasis>ional (3rd party) applications
151
to be installed; these are usually statically compiled and can be used in other
152
versions or Linux distributions.
157
<varlistentry><term><filename>/proc</filename></term>
160
Special dynamic directory that maintains information about the state of the
161
system, including currently running <emphasis>proc</emphasis>esses.
166
<varlistentry><term><filename>/root</filename></term>
169
<emphasis>Root</emphasis> user's home directory, pronounced
170
"slash-root".
175
<varlistentry><term><filename>/sbin</filename></term>
179
Important <emphasis>s</emphasis>ystem <emphasis>bin</emphasis>aries and scripts,
180
usually intended to be run as the root user.
185
<varlistentry><term><filename>/srv</filename></term>
188
Can contain files that are <emphasis>s</emphasis>e<emphasis>rv</emphasis>ed to
194
<varlistentry><term><filename>/sys</filename></term>
197
Similar to the /proc filesystem, but contains <emphasis>sys</emphasis>tem
198
information not related to running processes.
203
<varlistentry><term><filename>/tmp</filename></term>
206
<emphasis>t</emphasis>e<emphasis>mp</emphasis>orary files.
211
<varlistentry><term><filename>/usr</filename></term>
214
Applications and read-only files that are mostly available for all
215
<emphasis>us</emphasis>e<emphasis>r</emphasis>s to access.
220
<varlistentry><term><filename>/var</filename></term>
223
<emphasis>var</emphasis>iable files such as logs and databases.
232
<sect1 id="permissions" status="complete">
233
<title>Permissions</title>
236
All of the files on a Linux system have permissions that allow or prevent others
237
from viewing, modifying or executing them. The superuser "root" has the ability
238
to access any file on the system. Each file has access restrictions, user
239
restrictions, and an owner/group association.
243
Every file is secured by the following three layers of permissions, in order of
248
<varlistentry><term>user</term>
251
Applies to the user who is the owner of the file.
256
<varlistentry><term>group</term>
259
Applies to the group that is associated with the file.
264
<varlistentry><term>other</term>
267
Applies to all other users.
274
Inside each of the three sets of permissions are the actual permissions. The
275
permissions, along with the way they apply differently to files and directories,
280
<varlistentry><term>read</term>
283
Files or directory contents that can be <emphasis>viewed</emphasis> only.
288
<varlistentry><term>write</term>
291
Files or directory contents that can be modified or deleted.
296
<varlistentry><term>execute</term>
299
Files that can be run as a program or directories that can be entered.
306
To view and edit the permissions on files and directories, first open
307
<application>Konqueror</application> in file manager mode by selecting
308
<guilabel>Home Folder</guilabel> from the <guimenu>System Menu</guimenu> located
309
next to the <application>KMenu</application> icon in the bottom left corner of
310
your display. To display the dialog to allow permission editing,
311
<mousebutton>right</mousebutton> click on a file or directory, then select
312
<guimenu>Properties</guimenu>. The permissions are found under the
313
<guilabel>Permissions</guilabel> tab and allow for the editing of all
314
permission levels, if you are the owner of the file.
318
<!-- ROOT AND SUDO -->
319
<sect1 id="root-and-sudo" status="complete">
320
<title>Root And Sudo</title>
323
The root user in Linux is the user which has administrative access to your
324
system. Normal users do not have this access for security reasons.
325
Kubuntu does not enable the root user. Instead, administrative access is given
326
to individual users, who may use the "sudo" application to perform
327
administrative tasks. The first user account you created on your system during
328
installation will, by default, have access to sudo <emphasis>s</emphasis>uper
329
<emphasis>u</emphasis>ser <emphasis>do</emphasis>. You can restrict and enable
330
sudo access to users with the <application>Users and Groups</application>
331
application (review the <ulink type="help"
332
url="help:/kubuntu/keeping-safe/">Keeping Safe</ulink> documentation for more
337
When you run an application that requires root privileges, sudo will ask you to
338
input your normal user password. This ensures that rogue applications cannot
339
damage your system, and serves as a reminder that you are about to perform
340
administrative actions which require you to be careful!
344
To use sudo when using the command line, simply type "sudo" before the command
345
you wish to run. Sudo will then prompt you for your password.
349
Sudo will remember your password for a set amount of time (15 minutes by
350
default). This feature was designed to allow users to perform multiple
351
administrative tasks without being asked for a password each time.
356
Be careful when doing administrative tasks -- you could very well damage your
362
Some other tips for using sudo:
368
To use a "root" terminal, type "sudo -i" at the command line
374
The entire group of default graphical configuration tools in Kubuntu already
375
uses sudo, so you will be prompted for your password if needed using
376
<application>kdesu</application>, which is a graphical frontend to
377
<application>sudo</application>.
383
For more information on the <application>sudo</application> program and the
384
absence of a root user in Kubuntu, read the <ulink url="&wiki-RootSudo;">sudo
385
page</ulink> on the Ubuntu wiki.
390
<sect2 id="run-application-root" status="complete">
391
<title>Start a Program Manually with Root Privileges</title>
394
Sometimes it is necessary to run a program with root privileges. This is easy to
395
do with the <application>Run Command</application> dialog.
400
Be careful when doing administrative tasks -- you could very well damage your
408
Open the <application>Run Command</application> dialog by typing:
418
Enter the name of the program you wish to run, <emphasis>prefixed</emphasis>
419
with <application>kdesu</application> and press <keycap>Enter</keycap>. For
420
example, to launch the file manager <application>Konqueror</application>
421
with root privileges, type <screen>kdesu konqueror</screen>
429
<!-- USER MANAGEMENT -->
430
<sect1 id="user-mgmt" status="draft">
431
<title>User Management</title>
433
<procedure><title>Adding a user</title>
436
Open <application>System Settings</application> by going to &menusysset;.
441
<mousebutton>Click</mousebutton> on the <guiicon>User Management</guiicon> icon.
446
<mousebutton>Click</mousebutton> on the <guibutton>Administrator
447
Mode...</guibutton> button. When prompted for a password, enter you user
448
password and press the <guibutton>OK</guibutton> button.
453
<mousebutton>Click</mousebutton> on the <guibutton>New...</guibutton> button.
458
In the <guilabel>User Account - KDE Control Module</guilabel>, enter the
459
necessary information under the <guilabel>Details</guilabel> and
460
<guilabel>Password & Security</guilabel> sections. When you are complete,
461
press the <guibutton>OK</guibutton> button. The following examples are provided
462
to you for a better understanding.
463
<example><title>New User <guilabel>Details</guilabel></title>
466
<imagedata fileref="../../images/C/adduser_details.png" format="PNG" />
470
<example><title>New User <guilabel>Password & Security</guilabel></title>
473
<imagedata fileref="../../images/C/adduser_security.png" format="PNG" />
481
<procedure><title>Removing a user</title>
484
Open <application>System Settings</application> by going to &menusysset;.
489
<mousebutton>Click</mousebutton> on the <guiicon>User Management</guiicon> icon.
494
<mousebutton>Click</mousebutton> on the <guibutton>Administrator
495
Mode...</guibutton> button. When prompted for a password, enter you user
496
password and press the <guibutton>OK</guibutton> button.
501
Highlight the user that you would like to delete.
506
<mousebutton>Click</mousebutton> on the <guibutton>Delete...</guibutton> button.
511
When prompted with the <guilabel>Delete User Account - KDE Control
512
Module</guilabel> dialog, you have two options:
516
<guilabel>Delete home directory (/home/username)</guilabel> - this will remove
517
the user's home directory, therefor clearing up space on your hard drive. If
518
there is information you would like to backup, do so before deleting this
524
<guilabel>Delete group 'username' (1002)</guilabel> - this will remove the
525
group that was created for the user. Note your option may look different.
533
<procedure><title>Changing a user's password</title>
536
Open <application>System Settings</application> by going to &menusysset;.
541
<mousebutton>Click</mousebutton> on the <guiicon>User Management</guiicon> icon.
546
<mousebutton>Click</mousebutton> on the <guibutton>Administrator
547
Mode...</guibutton> button. When prompted for a password, enter you user
548
password and press the <guibutton>OK</guibutton> button.
553
Highlight the user whose password you would like to change.
558
<mousebutton>Click</mousebutton> on the <guibutton>Modify...</guibutton> button.
563
When prompted with the <guilabel>User Account - KDE Control Module</guilabel>,
564
select the <guilabel>Password & Security</guilabel> tab. Type in the
565
password you would like to change it to, as well as any of the security
566
settings you would like. When you are complete, press the
567
<guibutton>OK</guibutton> button.
574
<sect1 id="terminals" status="complete">
575
<title>Terminal</title>
578
Working at the command line is not as daunting a task as you would think. There
579
is no special knowledge needed to use the command line as it is a program like
580
everything else. Most things in Linux can be done using the command line.
581
Although there are graphical tools for most programs, sometimes they are just
582
not enough. This is where the command line comes in handy.
586
The terminal is often called the command prompt or the shell. In days gone by,
587
this was the way the user interacted with the computer; however, Linux users
588
have found that the use of the shell can be quicker than a graphical method and
589
still holds some merit today. Here you will learn how to use the terminal.
593
The original use of the terminal was as a file browser, and indeed it is still
594
used as a file browser. You can use the terminal as a file browser to navigate
595
your files and undo the changes that have been made.
598
<sect2 id="starting-konsole" status="complete">
599
<title>Starting the Terminal</title>
602
The <application>Konsole</application> can be started by going to &menukonsole;.
606
<sect2 id="common-commands" status="complete">
607
<title>Common Commands</title>
610
<varlistentry><term>View Directories: - ls</term>
613
The <application>ls</application> (LiSt) lists files in different colors with
619
<varlistentry><term>Create Directories: - mkdir (directory name)</term>
622
The <application>mkdir</application> (MaKeDIRectory) command will create a
628
<varlistentry><term>Change Directories: - cd (/directory/location)</term>
631
The <application>cd</application> (Change Directory) command will change from
632
your current directory to any directory you specify.
637
<varlistentry><term>Copy Files/Directories: - cp (file or directory name) (to
638
directory or filename)</term>
641
The <application>cp</application> (CoPy) command will copy any files you
642
specify. The <application>cp -r</application> command will copy any directories
648
<varlistentry><term>Remove Files/Directories: - rm (file or directory
652
The <application>rm</application> (ReMove) command will delete any filename you
653
specify. The <application>rm -r</application> command will remove any directory
654
you specify, and all its contents.
659
<varlistentry><term>Move/Rename Files/Directories: - mv (file or directory
663
The <application>mv</application> (MoVe) command will move/rename any file or
664
directory you specify.
669
<varlistentry><term>Find Files/Directories: - locate (file or directory
673
The <application>locate</application> command will search for any filename you
674
specify. It uses an index of the files on your system to work quickly. To update
675
this index, run the command <application>sudo updatedb</application>. This
676
command is run automatically each day if you leave your computer on. It needs to
677
be run with administrative privileges (see <xref linkend="root-and-sudo"/>).
684
You can also use wildcards to match one or more files, such as "*" (for all
685
files) or "?" (to match one character).
689
<sect2 id="switch-to-console" status="complete">
690
<title>Switching to Console mode</title>
693
The usual method of command-line access in Kubuntu is to start a terminal (see
694
<xref linkend="starting-konsole"/> above), however sometimes it is useful to
695
switch to the real console:
701
Use the &ctrlaltf1; shortcut keys to switch to the first console.
706
<para>To switch back to Desktop mode, use the &ctrlaltf7; shortcut keys.
712
<para>There are six consoles available. Each one is accessible with the
713
shortcut keys &ctrlaltf1; to &ctrlaltf6;.
718
<sect2 id="disable-terminal-beep" status="complete">
719
<title>Disabling the beep sound in Terminal mode</title>
724
Start a <application>Konsole</application> session, select by going to
733
<guimenu>Settings</guimenu>
734
<guisubmenu>Bell</guisubmenu>
735
<guimenuitem>None</guimenuitem>
737
to disable the system bell.
744
<!-- RESTART X SERVER -->
745
<sect1 id="restart-x" status="draft">
746
<title>Restart Kubuntu without rebooting</title>
749
To restart Kubuntu, or the <productname>X Window System</productname>, simply
751
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Backspace</keycap>
752
</keycombo>. This will take you to a blank screen momentarily and then bring
753
you back to the login screen (<acronym>KDM</acronym>).
757
<!-- TEXT EDITING -->
758
<sect1 id="text-editing" status="complete">
759
<title>Text Editing</title>
762
All of the configurations and settings in Linux are saved in text files. Even
763
though you most often can edit configurations through the graphical interface,
764
you may occasionally have to edit them by hand. <application>Kate</application>
765
is the default Kubuntu text editor, which can be launched by going to
770
At times in this guide, <application>Kate</application> is run from the command
771
line using <application>kdesu</application>, as most configuration files require
772
root privileges to alter them. It is recommended that you also run
773
<application>kdesu</application> from the command line when shown in this guide.
777
If you need to use a text editor from the command line, you can use
778
<application>nano</application>, which is a simple to use text editor. When
779
running it from the command line, always use the following command, which
780
ensures that the editor will not introduce line breaks:<screen>nano -w</screen>
784
For more information about how to use <application>nano</application>, refer to
785
the <ulink url="&wiki-Nano;">guide on the wiki</ulink>.
789
There are also quite a few other terminal-based editors available in Kubuntu,
790
popular ones include <application>VIM</application> and
791
<application>Emacs</application> (the pros and cons of each are cause for much
792
friendly debate within the Linux community). These are often more complex to use
793
than <application>nano</application>, but are also more powerful.