to
Using SuSE GNU/Linux:
Version 2.1b
This brief and basic guide assumes you have already successfully installed SuSE GNU/Linux, and have a root and at least one user account (called here user1) with the X server configured.
It is not intended to be a complete guide to using SuSE GNU/Linux but rather a brief collection of helpful practical notes.
The guide assumes that KDE is the default X Window Manager, with xdm running and was written for SuSE version 6.1
Note: for clarity commands which are typed in (to an xterminal, for example) are in italics.
Powering On and Logging In:
When you turn the system on, you will hear one 'beep' (a signal that all is well with the mainboard) and writing will scroll down the screen, showing BIOS and basic system information.
There will be a brief pause at Lilo boot... and then GNU/Linux will load, with more information scrolling down the screen until the default login screen is reached which will read:
Welcome at <host system name>
login:
password:
You must now login. To login, type either root or user1, press the Return key, then enter the password. Note - passwords when typed on GNU/Linux systems are not echoed/shadowed by ******** as on some other Operating Systems. If you make a mistake, you will simply be returned to the login prompt and will need to login again and then enter the password.
When logged in, the default Graphical User Interface (KDE) will appear, with icons. You are now ready to use GNU/Linux.
Learning About GNU/Linux:
If you are new to GNU/Linux, the best way to learn is to use GNU/Linux. If you login as, and use, a user account, you can move around the system and discover how things work without doing any damage to the system itself (unlike some other Operating Systems). At the very worst, your X Window will freeze - and you can simply exit by pressing the Control, Alt and Backspace keys. And if ever the system itself seems to you to be frozen, then press Alt and Fx (where x is 2, 3, 4, 5, 6) and you will open another virtual terminal with a prompt - or, if you are already using an X Window, Control-Alt-Fx which will again bring you to a command prompt.
To find your way around the system, use the KDE File Manager - left click on the folder icon in the bottom panel (it will read This folder contains all your personal files when you place your cursor over it). Use the arrows at the top left to move through and up the file system.
Xterminals and the Su Command:
Xterminals are a powerful feature of GNU/Linux - they give you access
to the shell, the 'command line', where you can enter, or type in, commands.
A lot of the power and flexibility of GNU/Linux derives from using the
shell, and by using it, you can configure and control your system.
When logged in as an ordinary user, there is a special command - su
-
which allows you access to the root shell (if you know and enter the root
password). To use this, open an Xterminal and type su - you will
be asked for the root password.
The su command is very useful, and saves logging out as a user and logging in as root. Be aware, though, that when you are logged in as root, either directly or when using the su command, it is possible to cause problems or damage your GNU/Linux Operating System, especially when editing configuration files.
KDE:
Several options are already configured - but you will probably need to configure access to floppy and CD-ROM drives, Internet Dial-up and Netscape.
To configure an item, right click on an empty area in the 'desktop' and from the menu choose either File system device (for floppy and CD-ROM drives) or Application (for Netscape). When the window opens change the Device or Program entry by placing the cursor over it, deleting it and typing in a new entry: for - for floppy, change it to Floppy, for CD-ROM change it to CD-ROM, and for Netscape, change it to Netscape
Next, when the new icon appears on the desktop, right click and choose Properties.
For a file system device, go to the Device tab, and enter /dev/fd0 (that is fdZero) under device, for floppy, - or /dev/cdrom for CD-ROM - then click on Mounted Icon and Unmounted icon and choose the icon you want to use from the list. To finish click OK.
For a Program, first go to Execute tab, then Browse, then to the top folder with the two dots (..) then Opt, then Netscape, the go down until you find the Netscape programme (under netscape and usually about 13521 bytes depending on the version of Netscape). Click once on this and it will be entered in the Execute box. Then click on the icon button and choose an icon from the list.
Next, go to the Application tab and in the Comment box enter Netscape. And the same with the Name box under this. Then click OK and the new icon will appear on the desktop ready to use. Clicking once should start Netscape - if not, check the path in the Execute tab.
The Internet Dial-up tool is listed under Internet from the Start Menu (the large K icon at bottom left) and you will need to enter your ISP details. Note, when accessing (mounting) floppies (and CD-ROMs) under GNU/Linux you must dismount them when finished - to do this, right click once on the icon, then left click once on Unmount.
Editing Files as Root:
You will often need to edit or create files. You must login as root, or (better) use the su command in a user Xterminal. The easiest editor to use is Vim - see the Vim manual page (enter man vim in an Xterminal). To start Vim simply enter
vim
followed by the path to the file you want to edit (e.g. /etc/fstab ).
Vim starts in Command mode - to enter text, press the i key, and then move the cursor to the desired position. When finished editing, press the Escape key (Esc), which brings you back to command mode. To save and exit, you must be in command mode, and enter
:wq
where w means 'write' and q, quit. Remember to add the : symbol also before wq. To delete text, enter command mode - pressing the x key deletes what is under the cursor.
Some Basic Commands:
A command can be a combination of letters, a single letter, a name, or a combination of all these. The basic structure of commands is:
commandname/indicator <flag(s)> <argumentA> <argumentB> <argumentX>
Simple commands consist of just a name or some letters - such as cd. Most simple commands can have a flag and arguments applied to them which can be said to 'refine' the basic command or make it perform a specific function. The flags and arguments for a particular command are given in the man page associated with the command - enter man <command> in an xterminal to view the manual. Flags are often preceded by a minus sign, or two minus signs ( --) and the flag is always separated from the command, and the arguments from the flags, by a space. Note that all directories begin with a / and this must be written - e.g. to specify the /home/user1 directory, it must be written with / first.
cd <name> change to the directory <name>. Here, cd is the command, and <name> an argument of the command
ls list the files in the current directory
ls -a list all the files in the current directory
mkdir <name>
create a new directory with the name <name>
Adding New Users:
To add a new user, login as root, or use the su command, then type:
useradd -m <username>
where <username> is the name of the user. The command -m adds a directory for the user in /home.
Then, type:
passwd <username>
and enter the password for this user.
To change the password for a user at any time, login as the user, and type:
passwd
You will then be prompted to enter a new password.
Changing Default System Name:
To change the default system name (from space.time) start YAST (from icon in KDE - then Everything/System tools). You will prompted for root password if using a user account - and from the Yast menu choose System Administration, then Network Configuration then Change Host Name.
Adding New Software:
To install software from CD-ROM other than the SuSE CD's (e.g. Applixware Office) you can mount the CD-ROM manually from the command line, as root, or use the command su in a user Xterminal which will bring you to a root prompt. You should then type:
mount /dev/hdc -o ro /cdrom
This will give execute access to the CD-ROM. Alternatively, you could, as root, change (by adding 'exec') the /etc/fstab file, then change it back after the install. To do this, change the /dev/hdc /cdrom line to read:
/dev/hdc /cdrom iso9660 noauto,ro,exec 0 0
Software that you load onto the system should normally be placed in either /opt/ or in your home directory (e.g. /home/user1/).
Logging Out:
To logout - e.g. to change from root to user1 and vice versa - either use the logout button after opening the K 'start menu' or right click on an empty Desktop area, then click on 'logout'.
If you are using a text console (e.g. the display has frozen and/or you used Ctrl-Alt-F2 ) then to logout - e.g. to change from root to user1 and vice versa - type
logout
Shutting Down:
It is important to shut GNU/Linux down correctly, otherwise the file system may be damaged. If you are using a non-root account, then open an Xterminal, type
su
and enter the root password. Then type:
shutdown -h now
When you see:
Master Resource Control: run level 0 has been reached
it is safe to turn the system off.
If you just want to reboot the system, enter:
shutdown -r now
The Top and Kill Commands:
Sometimes, you may find that you cannot stop a process (or 'program')
that you have been running when clicking the 'close/exit' button. To stop
the
process, you need to know what is called its PID (Process ID).
There are two ways of finding this. First, enter
ps f
in an xterminal. Second, enter
top
then enter the single letter
u
(for user) followed by your user name. This will show all the processes you are running and the PID's. To quit top, simply enter the single letter
q
To stop - kill - the process enter
kill <PID>
If this does not work (and it usually does) enter
kill -9 <PID>
which will certainly terminate the process.
Viewing System Messages:
To view system messages, su, then in the xterm enter:
tail -f /var/log/messages
This will show the last ten messages, and show any new messages as they occur. The f option in the above command basically means 'keep going' and keeps the tail command running. To exit, click on the xterm (to bring it to the foreground) then press the Control [Ctrl ] and c keys at the same time.
If you want to see the messages in the xconsole (if you are using xdm or kdm and for instance IceWM) enter:
tail -f /var/log/messages > /dev/console
The symbol > means re-direct: the output of the previous command is
re-directed to the xconsole.
Configuring Sendmail and Pine:
While Netscape can be used to send and receive mail, it is better to use a proper MTA (Mail Transfer Agent). The standard is sendmail and this MTA is installed by default.
Configure sendmail using YaST (go:- System Administration, then Network configuration, then configure sendmail). Then use the following hack: go to /etc/sendmail.conf and under #Smart relay host add the name of your ISP smtp server:
DS<smtp server>
Then after #who I masquerade add the last part of your ISP E-mail address:
DM<ISP address>
Note: There should be no space after either DS or DM.
To use sendmail with this hack, you need to have or create an account
for yourself with the username which is the first part of your provided
or chosen ISP E-mail address. For instance, if you have orion@dial.pipex.com
as your E-mail address, then create user orion.
All that needs to be done then is hack Pine, a MUA (Mail User Agent).
Start by entering
pine
in an xterm, then choose Set Up , then Configure.
All you need to configure here are:
1) Personal name - as you wish it to appear on E-mails
2) User-domain - is your ISP name (e.g. dial.pipex.com)
3) smtp-server - this should be set to the system name (e.g. spacetime)
to use sendmail.
Notes: (1) When you are composing a mail, pine drops you
into Command mode (see Editing Files as Root above) - press i to enter
text, and Esc when finished, etc. (2) If when starting pine you get a message
about missing mail folders, exit, then enter elm in an xterm, accept the
defaults and it will create the necessary mail folders. (3) elm is another
MUA which you can use as an alternative to pine.
Another good mailer, VM, is included with Xemacs - enter xemacs
in
an xterm, then from the top menu bar choose Apps, then Read Mail (VM).
To
compose, click once on the Compose icon. To send, click on the Mail
option from the top menu bar, then Send. You can also use mail
which is the Unix
default - just enter mail in an xterm.
To retrieve mail from your ISP you need a programme such as Fetchmail,
which is available on the SuSE CD's (check under net - it is listed under
POP).
Fetchmail:
To configure fetchmail create a file, in the home directory of the user, called .fetchmailrc (note the dot - . - before the filename). Thus if the user is orion, this would be in /home/orion. This must be owned by the user, and have the following permissions:
rw- --- ---
(Note: You can use Tkdesk to create the file, and change/set the permissions - click on the Info icon to change/set permissions.)
The .fetchmailrc file should be along the following lines:
set postmaster "<username>"
poll <POP mail server> with proto POP3
user "<POP username>" there with password "<POPpassword>" is <username> here
This assumes POP3 protocol is being used. The username is the username
on the localhost, the POP mail server the ISP mail server domain
name (e.g.
pop.dial.pipex.com); and the POP username your ISP/mail username. Postmaster,
POP username, and POP password should be enclosed in quotes (" ...
").
To run fetchmail, connect to the ISP, enter fetchmail in an xterm
and it will collect and deliver your mail to /var/spool/mail/<username>
where it can be
read by elm or any other MUA.
Many options can be entered in the .fetchmailrc file - see the documentation
in /usr/doc/packages/fetchmail. For instance, you can set a logfile (e.g.
/var/log/fetchmail.log), set a daemon to poll for mail at regular intervals,
and poll several mail accounts.
For instance, if you have multiple accounts on one POP server, and another
account on another POP server, you should create a root .fetchmailrc (in
/root) which is like this:
set postmaster "postmaster"
poll pop <POP mail server> with proto POP3
user <POP username1> there with password
"<POPpasswd1> is <username> here
user <POP username2> there with password
"<POPpasswd2> is <username> here
poll pop <POP mail server2> with proto POP3
user <POP username3> there with password
"<POPpasswd3> is <username> here
You can then su, and run fetchmail which will poll the different
accounts and deliver the mail to the correct users. When fetchmail
exits it issues an exit
code - the normal (error free) ones are 0 (mail retrieved) and 1 (no
mail on server). If you want to see what fetchmail is doing, start
fetchmail with the
flag -v thus:
fetchmail -v
System Configuration:
In SuSE, the main system configuration file is /etc/rc.config.
If you want to edit your preferences (e.g. Window Manager) it can be done
here. But it is usually better to use YaST (the System Administration
menu) for those items which YaST lists.
Echo Request - PPP
It is useful - when connected to an ISP - to send a request if no data has been received from the peer for a while. The peer should then echo the request. To do this uncomment the following lines in /etc/ppp/options
lcp-echo-interval 30
lcp-echo-failure 4
Direct ISP Connection
To set up a direct Net connection, you need to edit /etc/rc.config
and
change Nameserver from Yast-Ask to that of your own ISP DNS - for example
194.75.152.200. If there is a secondary DNS then enter it after the
primary, putting a space between the two numbers. Also enter the name of
your ISP after Searchlist=
Next make sure /etc/httpd/httpd.conf has the entry
ServerName localhost
Also check that /etc/resolv.conf contains the same entries as the ones added to /etc/rc.config - if not, start YaST and go Network then Configure Nameserver. After you have altered /etc/rc.config you need to enter, as root,
/sbin/SuSEconfig
to set the changes.
The first method to connect is the easiest: install wvdial, then configure it (see man wvdial). To connect, enter in an xterm
wvdial
To disconnect, bring the xterm with wvdial into foreground, and press
the Control and c keys together.
The second method involves writing a connection script and adding a few files.
(1) create a new directory in /etc called chatscripts and then create a new file in /etc/chatscripts called provider. Make this root, and group dialout with rw- r- --- permissions.
(2) create or edit /etc/ppp/chap-secrets (or pap-secrets) and add your ISP username and password, e.g.
myISPusername * my password
If your login name and/or password has characters then it should be
enclosed in quote marks, e.g. 'uk/loginname'. Make sure this file has only
rw-
--- --- permissions.
(3) Add a new file called provider to /etc/ppp/peers and make it rw- r-- ---. This should be owned by root and be group dialout.
(4) Using an editor such as vi or tkdesk open the new file provider in /etc/chatscripts and enter:
#begin
ABORT
BUSY
ABORT "NO CARRIER"
ABORT VOICE
ABORT "NO DIALTONE"
ABORT "NO ANSWER"
"" ATZ OK
ATDT<ISP number>
CONNECT \d\c
#end
Note: the two sets of quotation marks in the third line from the bottom
, and before ATZ should be together - no space between.
(5) Open the same editor and the /etc/ppp/peers/provider file and enter
# begin
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/provider"
dev/ttyS1
115200
defaultroute
noipdefault
user <ISP username>
#end
Note: if necessary change /dev/ttyS1 to the port your modem is on.
(6) create a new file called pon in /usr/bin and edit it to read
#!/bin/sh
/usr/sbin/pppd call ${1:-provider}
Then make this rwx r-x r-x and root/root.
You can then add the users who will connect to the group dialout by
gpasswd -a <username> dialout
To connect, simply enter
pon
To disconnect, bring the xterm with pon to the foreground, then press
the Control and c keys together (same when using wvdial).