Înainte de a citi acest articol facem presupunerea că aţi instalat Slackware aşa cum a fost descris în ghidul de instalare, şi că aveţi un sistem Slackware instalat nou cu opţiunile preferate.
Acest ghid vă va îndruma primii paşi în Slackware. După ce instalarea Slackware s-a terminat iar sistemul a repornit şi v-aţi autentificat, probabil vă întrebaţi ce să faceţi în modul text cu acel cursor care clipeşte. Citind acest articol veţi înţelege cum să faceţi configuraţia iniţială a noului sistem Slackware.
Înainte de a continua, este important să realizaţi că managerul de pachete din Slackware nu verifică dependinţele între pachete. Dacă utilizaţi Slackware pentru prima oara, pentru a preveni problemele care pot apara ulterior, este indicat să faceţi o instalare completă (poate singura excepţie ar putea fi seria de pachete KDEI).
Slackware recomandă oficial 1): “Dacă aveţi destul spatiu pe hard disk, vă încurajăm să faceţi o instalare completă pentru a avea cele mai bune rezultate”.
Când Slackware porneşte pentru prima oară după finalizarea instalării, veţi observa că sistemul se opreşte în modul text cu o consolă de login şi nu o interfată grafică aşa cum poate sunteţi obişnuit din alte distribuţii Linux. Nu lăsaţi acest lucru să vă descurajeze. Este primul pas în procesul de învăţare iar în mai puţin de cateva saptămâni veţi deveni mult mai experimentat în Linux.
Procesul de instalare nu oferă posibilitatea adăugării unui nou utilizator. Astfel, în acest moment nu există decât un singur cont disponibil, acela al utlizatorului “root
”. Va trebui să vă reamintiţi parola pentru contul de root, cea pe care aţi configurat-o aproape de sfârşitul procesului de instalare. Autentificaţi-vă ca “root” - prompt-ul afişat va conţine caracterul “#” specific unei console de root.
Ce facem în continuare? Utilizatorul “root
” nu reprezintă contul pe care îl vom folosi pentru lucrul de zi cu zi. Root este contul de super-utilizator menit a fi folosit, de exemplu, pentru mentenanţa sistemului, a configurării lui sau a instalării sau upgradării de soft.
Primul lucru pe care îl vom face este crearea unui cont nou, fără privilegii de super-utilizator. După acest pas, putem să ne gândim la instalarea “drivere-lor grafice proprietare” (în cazul în care deţineţi o placă grafică cu GPU Nvidia sau Ati), configurarea conexiunii wireless sau pornirea mediului grafic. Sunt foarte multe lucruri pe care le puteţi face cu Slackware! Haideţi să începem cu începutul.
Primul lucru pe care îl veţi face, va fi crearea unui cont propriu fără drepturi de root (numit generic non-root). Aveţi două alternative amândouă din consolă. Prima posibilitate precum şi cea recomandată este folosirea unei comenzi interactive, numită adduser
. Tastaţi:
# adduser
și urmați instrucțiunile. Citiți eventual pagina de dministrare a utilizatorilor pentru mai multe detalii despre comanda adduser. Puteți folosi, de asemenea, comenzi non-interactive precum comanda standard Linux useradd:
# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /bin/bash slacker
Odată creat utilizatorul dorit puteţi să vă autentificaţi cu noul cont.
Ieşiţi din contul curent, cel de root (tastând logout
) şi conectaţi-vă folosind noul cont proaspăt creat. De acum putem spune ca aventura devine mai interesantă!
Acum că aveţi un sistem Slackware funcţional, puteţi să vă gândiţi un moment la cum să menţineţi sistemul “sănătos”. Programele instalate inţial, dacă nu sunt updatate pot dezvolta vulnerabilitaţi de-a lungul timpului. Când aceste vulnerabilitaţi sunt critice pentru sistem, Slackware publică un patch (sau o nouă versiune) care să corecteze problemele. Noile versiuni ale pachetelor sunt disponibile online (în directorul /patches
din distribuţie) precum şi anunţate pe lista de e-mail Slackware Security.
Aveţi mai multe variante pentru a menţine un sistem Slackware up-to-date. Nu este recomandat a face procesul de update al patch-urilor de securitate total automat, însă este posibilă verificarea periodică a acestor update-uri dintr-un proces cron.
Cea mai bună opţiune este folosirea programului slackpkg, care este un manager de pachete peste pkgtools specific Slackware. Înainte de a folosi slackpkg
va trebui specificat un server apropiat de regiunea geografică în care locuiţi (numit mirror - eng. oglindă) pentru a copia cât mai rapid update-urile pe propriul calculator.
O lisă a acestor servere disponibile pentru versiunea Slackware dorită poate fi găsită în acest fişier:
/etc/slackpkg/mirrors
Deschideţi fişierul într-un editor de text precum nano
sau vi
decomentați o singură adresă URL. Asiguraţi-vă că mirror-ul ales conţine versiunea Slacware pe care o folosiţi! Totodată, alegeţi serverul cel mai apropiat de zona în care locuiţi sau serverul care ştiţi că este cel mai rapid. Când a-ţi terminat va trebui să reiniţializaţi baza de date a slackpkg rulând:
# slackpkg update gpg # slackpkg update
Atenţie: comenzile de mai sus trebuiesc rulate ca “root
” !
Va trebui ca baza de date a slackpkg
să fie updatată din când în când, mai ales când aflaţi de disponibilitatea unor pachete noi. După reîmprospătarea bazei de date puteţi să copiaţi noile pachete pe calculator pentru a fi instalate. Vă rugăm să verificaţi pagina slackpkg pentru a afla mai multe detalii despre cum trebuie folosită această unealtă.
Cartea Slackware Essentials are un capitol despre menţinerea sistemului la zi. Ar fi o idee bună să îl citiţi dacă nu a-ţi făcut-o deja.
# wget http://www.slackware.com/~alien/tools/rsync_slackware_patches.sh -O /usr/local/bin/rsync_slackware_patches.sh # chmod +x /usr/local/bin/rsync_slackware_patches.sh
Scriptul foloseşte mai multe obţiuni prestabilite pe care va trebui să le modificaţi pentru a-l personaliza - cum ar fi locaţia unde scriptul va descărca noile pachete.
Rulaţi scriptul simplu, fără nici o opţiune, pentru a vedea ce raportează:
# /usr/local/bin/rsync_slackware_patches.sh [rsync_slackware_patches.sh:] Syncing patches for slackware version '13.37'. [rsync_slackware_patches.sh:] Target directory /home/ftp/pub/Linux/Slackware/slackware-13.37/patches does not exist! [rsync_slackware_patches.sh:] Please create it first, and then re-run this script.
You notice that you will have to edit the script and define a local directory (and create that directory too!) for the script to use. When that is done, you should run the script once - for a first-time download of patches.
Then you can use cron to run the script once a day. For instance, schedule the script to run at 05:33 every day, and let it check for updates to the 64-bit version of Slackware-13.37. Open the crontab editor by typing
crontab -e
and then you add the following line to your cron table:
33 5 * * * /usr/local/bin/rsync_slackware_patches.sh -q -r 13.37 -a x86_64
This command will be executed silently (meaning you will not get emailed) if no new patches are found. However when the script finds updates it will download them and email you the script's output. You will get an email like this:
[rsync_slackware_patches.sh:] New patches have arrived for Slackware 13.37 (x86_64)! ....................................................................... 0a1,10 > Mon Sep 10 20:26:44 UTC 2012 > patches/packages/seamonkey-2.12.1-x86_64-1_slack13.37.txz: Upgraded. > This is a bugfix release. > patches/packages/seamonkey-solibs-2.12.1-x86_64-1_slack13.37.txz: Upgraded. > This is a bugfix release. > +--------------------------+ > Sun Sep 9 19:11:35 UTC 2012 > patches/packages/mozilla-thunderbird-15.0.1-x86_64-1_slack13.37.txz: Upgraded. > This is a bugfix release. > +--------------------------+
And then you know you have to update slackpkg and make it install the latest patches. This gives you control over your updates (you decide when you update) while being automatically warned about the availability of new patches (which will already have been downloaded for you).
If you installed the network packages, then at the end of the Slackware installation, you will have been asked a couple of simple questions, like:
All of these questions have resulted in the setup of a few network related configuration files.
/etc/rc.d/rc.inet1.conf
netconfig
tool will only configure your eth0
interface. If you have additional network interfaces, you can edit the file with a text editor such as nano
or vi
and add you configuration details. There is a man page for this: man rc.inet1.conf
/etc/resolv.conf
man resolv.conf
/etc/HOSTNAME
/etc/hosts
man hosts
If you want to read in more detail about how to configure your network, have a look at this online comprehensive guide to networking in Slackware.
To configure your wired network interface eth0
, run (as root)
# netconfig
The same script which was run during the installation process.
netconfig
only deals with the wired connection for eth0
.
On the assumption that you configured your wired connection with netconfig
, your network should be connected automatically without the need for any post-installation configuration.
If you didn’t enter your network configuration details during installation, just run netconfig
as root; then run
# /etc/rc.d/rc.inet1 eth0_start
and you should have a working network connection instantaneously.
Most common wireless hardware is supported by Linux these days. You can search online if your wireless hardware is supported by 3rd parties that have written Linux drivers. If you want to know if your computer recognizes your wireless card, simply run
# iwconfig
as root. If that tool reports “no wireless extensions” for all your network interfaces then the kernel does not have a driver for your wireless card and you'll have to find one online.
As with the wired network interfaces, your wireless card is traditionally configured in the file /etc/rc.d/rc.inet1.conf
. You can read a lot more about it in this wireless configuration guide. There is also the man page:
# man rc.inet1.conf
You will also need to take steps to include wireless security, whether WEP or WPA2. Unencrypted wireless connections are strongly discouraged. Note that WPA/WPA2 encryption is not configured just in /etc/rc.d/rc.inet1.conf
, you will also need to edit /etc/wpa_supplicant.conf
and add an encryption key there.
Wireless encryption issues, in particular for WPA, can be hard to troubleshoot. Some basic troubleshooting steps are detailed in the above networking guide, just in case you do not get your computer associated to the Access Point.
Slackware currently has some alternatives to configure and monitor your network connections. These install a daemon (aka a background service) which will allow you to switch between wired and wireless connections easily. That makes them perfectly suited for mobile users. They come with graphical configuration utilities and do not depend on the traditional Slackware configuration files - in fact, those files will cause conflicts if they contain network configuration.
# chmod +x /etc/rc.d/rc.wicd
You can then configure your network using the graphical tool wicd-client
or if you are running Slackware 14 you can use the KDE widget for wicd instead. For console lovers, there is also wicd-curses
which offers the same configuration capabilities as the X-based counterparts.
# chmod +x /etc/rc.d/rc.networkmanager
which will make NetworkManager start at boot. You will have to configure NetworkManager using an X-based graphical utility.
Slackware 14 includes a KDE widget for Networkmanager. If you are using another Desktop Environment like XFCE, you can install the Gnome network-manager-applet from SlackBuilds.org.
It's recommended that you switch to Slackware's generic kernel. This is easy to do but there are a few steps to follow.
# /usr/share/mkinitrd/mkinitrd_command_generator.sh
This command will not actually do anything. It is informational only, and will output something like this - depending on your kernel version, your hardware configuration, the root filesystem you chose when you installed Slackware and so on:
# # mkinitrd_command_generator.sh revision 1.45 # # This script will now make a recommendation about the command to use # in case you require an initrd image to boot a kernel that does not # have support for your storage or root filesystem built in # (such as the Slackware 'generic' kernels'). # A suitable 'mkinitrd' command will be: mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
Run the script's suggested mkinitrd
commandline (as root) to generate the initrd.gz
image.
/etc/lilo.conf
by adding a section to your Slackware entry as follows: image = /boot/vmlinuz-generic-3.2.29 initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz root = /dev/sda1 label = Slackware read-only
Actually, the “mkinitrd_command_generator.sh
” script will show an example section which can be added to /etc/lilo.conf
if you pass it the name of the generic kernel as an argument, like this:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29
Note that it is recommended to add a new section instead of editing the existing kernel image section. Assign a unique label to your new section. After reboot, LILO will give you two options: to boot into your freshly added generic kernel, or to boot into the failsafe huge kernel (of which you are certain that it will work).
/etc/lilo.conf
you have to save the file and then run # lilo -v
to make your change permanent. Then, reboot.
mkinitrd
manual page (man mkinitrd
) for more information. initrd.gz
, then booting will fail with a kernel panic.
X.Org is the X-Window framework used in Slackware. The X server will usually auto-detect your graphics card and load applicable drivers. If auto-detect does not work (X crashes on startup), you will need to create a file /etc/X11/xorg.conf
and set the correct options for your graphics card and display resolution. You can use
# X -configure
to generate a basic xorg.conf
configuration file in your current directory. This file can then be customized and placed in the /etc/X11/
directory. For a detailed overview of X configuration, check the xorg.conf
manual page (man xorg.conf
).
Many people use computers with a modern graphics card powered by a Nvidia or Ati GPU (graphics processing unit). The vendors of these high-performance graphics card offer non-free (proprietary binary-only) drivers for their cards. These binary-only drivers will boost your computer's graphical and in particular OpenGL performance. If you own such a card you may want to read our Wiki article “Proprietary Graphics Drivers”.
To choose the Window Manager or Desktop Environment you wish to use, run the xwmconfig
utility:
$ xwmconfig
and select one of the available options. Note that you can run the xwmconfig
command as the root
user which will set a global default for all users. By running the same command as your ordinary user account, you override that global default and pick your own.
After making your choice you can simply run
$ startx
Your preferred Desktop Environment or Window Manager will then start up.
To start with a graphical login screen on boot instead of Slackware's default console login, change the default runlevel to 4. Edit the file /etc/inittab
and change the line that looks like
id:3:initdefault:
to
id:4:initdefault:
Note the difference from other Linux distributions; many of those use runlevel 5 for their graphical login. In Slackware, runlevel 5 is identical to runlevel 3 (console boot).
In the graphical runlevel, you will be greeted by one of the available display (login session) managers. Slackware will by default look for the availability of GDM (Gnome Display Manager), KDM (KDE Display Manager) and XDM (X Display Manager) - in that order. You can also install a third-party login manager like SliM but you will have to edit /etc/rc.d/rc.4
and add a call to your new session manager all the way at the top.
It may be of interest to new Linux users to explore the command line a bit more before installing a graphical desktop, just to learn some shell commands and applications available in non-graphical mode. Slackware excels in having an abundance of command line programs for a wide range of tasks.
For instance, web browsing can be done with lynx or links, which are console based web browsers. You can listen to music (even network audio streams) on the console using audio players like moc, mpg123, ogg123.
If you just installed the 64-bit version of Slackware (often called slackware64 or Slackware for x86_64) you will soon discover that it will refuse to run 32-bit programs like Wine. You may want to read our page on adding multilib capabilities in that case.
Even a Slackware user can benefit from good documentation (why else are you reading this?). Our suggestion is that you browse this Wiki for additional tips and HOWTOs. And don't forget to check out the root directory of the Slackware DVD or CD1! You'll find Slackware's own main documentation there. Every text file there is worth a read.
If you have been using Slackware for a while and want to upgrade to the next release once that becomes available, we have a nice HOWTO available here: Upgrading Slackware to a New Release
When tracking current, you should always read the latest ChangeLog.txt before upgrading the system, to see whether any additional steps are required to be performed before or after upgrading. For upgrades to a stable release, it is a good idea to read the UPGRADE.TXT
and CHANGES_AND_HINTS.TXT
files located on the CD/DVD or the official mirror.