[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slackware:beginners_guide [2012/09/18 16:11 (UTC)] – [Traditional Network Configuration] hazelslackware:beginners_guide [2017/10/15 10:08 (UTC)] (current) – How to update your packages using slackpkg alienbob
Line 1: Line 1:
 ====== Configure your new Slackware System ====== ====== Configure your new Slackware System ======
  
-We'll assume that you've read [[slackware:install|the Installation Guide]] and that you have a clean install of Slackware on your machine and that you're happy with that.+We'll assume you've read [[slackware:install|the Installation Guide]]and you have a clean install of Slackware on your machine that you're happy with.
  
 This beginner's guide is meant to put you firmly on the Slackware path. If you installed Slackware for the first time, you may be daunted by the sight of the blinking cursor at a console login. Let this page guide you through the initial configuration of a freshly installed Slackware system. This beginner's guide is meant to put you firmly on the Slackware path. If you installed Slackware for the first time, you may be daunted by the sight of the blinking cursor at a console login. Let this page guide you through the initial configuration of a freshly installed Slackware system.
Line 14: Line 14:
 The installation did not offer to create a user account. At this stage, there is only the "''root''" account. You should remember the root password, which you set at the very end of the installation procedure. Login as "root" now - you will find yourself at a "**#**" console root-prompt. The installation did not offer to create a user account. At this stage, there is only the "''root''" account. You should remember the root password, which you set at the very end of the installation procedure. Login as "root" now - you will find yourself at a "**#**" console root-prompt.
  
-So now what? The "''root''" user is not the account which you are going to use as a matter of routine. Root is meant for system maintenance and configuration, software upgrades and the like. \\ The first thing to do is create a fresh user account for yourself, without the root privileges. After that, it is time to start considering the installation of [[slackware:amd_nvidia|non-free graphical drivers]] (if you own a Nvidia or Ati card), setting up a wireless network connection or starting a graphical desktop environment. There is a lot that you can do with Slackware! Let's start with the basics.+So now what? The "''root''" user is not the account which you are going to use as a matter of routine. Root is meant for system maintenance and configuration, software upgrades and the like. \\ The first thing to do is create a fresh user account for yourself, without the root privileges. After that, it is time to start considering the installation of "[[howtos:hardware:proprietary_graphics_drivers|Proprietary Graphics Drivers]](if you own a Nvidia or Ati card), setting up a wireless network connection or starting a graphical desktop environment. There is a lot that you can do with Slackware! Let's start with the basics.
  
  
Line 22: Line 22:
 # adduser # adduser
 </code> and follow the prompts. Read the [[slackbook:users|user management]] page for more detail on the ''adduser'' script. You can use the non-interactive  standard Linux program ''useradd'' too: <code> </code> and follow the prompts. Read the [[slackbook:users|user management]] page for more detail on the ''adduser'' script. You can use the non-interactive  standard Linux program ''useradd'' too: <code>
-# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev -s /bin/bash slacker+# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /bin/bash slacker
 </code> Once that’s done you can log in to your user account. \\ Log out of the root account (type ''logout'' at the root prompt) and then login using the new account you just created. Now come the really interesting adventures! </code> Once that’s done you can log in to your user account. \\ Log out of the root account (type ''logout'' at the root prompt) and then login using the new account you just created. Now come the really interesting adventures!
 +
 +
 +===== Make Slackware Speak your Language =====
 +
 +Slackware's installer is English-only and it will also assume that English is the language in which you want to be addressed by the programs on your computer. If you are a non-English speaker and want your Slackware system to "talk" to you in your own language, you should check out our instruction article "[[slackware:localization|Localization: Adapt Slackware to your own Language]]"
  
  
 ===== Configure a Package Manager ===== ===== Configure a Package Manager =====
  
-Now that you have Slackware running, you should consider spending a bit of time caring for your computer's good health. The software which was installed as part of the Slackware release you are running, may develop [[wp>Vulnerability_%28computing%29|vulnerabilities]] over time. When those vulnerabilities are critical to the health of your computer, then Slackware will usually publish a patched version of the software package. These patched packages are made available online (in the ''/patches'' directory of the release) and announced on the [[security:start|Slackware Security mailing list]].+Now that you have Slackware running, you should consider spending a bit of time caring for your computer's good health. The software which was installed as part of the Slackware release you are running, may develop [[wp>Vulnerability_%28computing%29|vulnerabilities]] over time. When those vulnerabilities are critical to the health of your computer, then Slackware will usually publish a patched version of the software package. These patched packages are made available online (in the ''/patches'' directory of the release) and announced on the [[howtos:security:start|Slackware Security mailing list]].
  
 You have various options in order to keep your Slackware installation up-to-date. It's not advised to make the process of applying security updates fully automatic, but it is possible to do so using a cron job. You have various options in order to keep your Slackware installation up-to-date. It's not advised to make the process of applying security updates fully automatic, but it is possible to do so using a cron job.
Line 40: Line 45:
   /etc/slackpkg/mirrors   /etc/slackpkg/mirrors
  
-Open the file in a text editor such as ''nano'' or ''vi'' and uncomment __a single__ mirror URL. Make sure that the URL mentions the release number for the version of Slackware you are running! Also, pick a mirror which is close to you or of which you know it is fast. When you have done that, you need to initialize slackpkg's database by running <code># slackpkg update</code>+Open the file in a text editor such as ''nano'' or ''vi'' and uncomment __a single__ mirror URL. Make sure that the URL mentions the release number for the version of Slackware you are running! Also, pick a mirror which is close to you or of which you know it is fast. When you have done that, you need to initialize slackpkg's database by running <code># slackpkg update gpg 
 +# slackpkg update</code>
  
 Note that package management is done as the "''root''" user! Note that package management is done as the "''root''" user!
  
 You will need to update the ''slackpkg'' database from time to time, when you learn about the availability of new patches for your distribution. After updating the database you can let it download and install the updates. Again, see the [[slackware:slackpkg|slackpkg]] page for guidelines about the use of this tool. You will need to update the ''slackpkg'' database from time to time, when you learn about the availability of new patches for your distribution. After updating the database you can let it download and install the updates. Again, see the [[slackware:slackpkg|slackpkg]] page for guidelines about the use of this tool.
 +
 +==== Installing updates using slackpkg ====
 +
 +The ''slackpkg update'' command will connect to a Slackware mirror and update the local package information database on your computer. This command does not actually //install// any package!\\ The usual routine for upgrading your Slackware to the latest patches is as follows: <code>
 +# slackpkg update
 +# slackpkg install-new
 +# slackpkg upgrade-all
 +# slackpkg clean-system
 +</code> The "install-new", "upgrade-all" and "clean-system" commands will always show you a list of candidate packages to act on before excecuting anything. This allows you to review the suggested package alterations and select/deselect anything you do not agree with.\\ The "clean-system" is technically only needed after you upgrade from one Slackware release to the next (say, from  14.1 to 14.2) and it is meant to remove any Slackware package which is not (or no longer) part of the core distribution.
 +
 +<note important>The ''slackpkg clean-system'' command regards any 3rd package as a candidate for removal! Therefore, be smart with your blacklist (''/etc/slackpkg/blacklist'')</note>
  
 ==== Watching for Updated Packages ==== ==== Watching for Updated Packages ====
Line 61: Line 78:
 [rsync_slackware_patches.sh:] Please create it first, and then re-run this script.                             [rsync_slackware_patches.sh:] Please create it first, and then re-run this script.                            
 </code> \\ 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 <code>crontab -e</code> and then you add the following line to your cron table: <code> </code> \\ 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 <code>crontab -e</code> and then you add the following line to your cron table: <code>
-33 5 * * *      /usr/local/sbin/rsync_slackware_patches.sh -q -r 13.37 -a x86_64+33 5 * * *      /usr/local/bin/rsync_slackware_patches.sh -q -r 13.37 -a x86_64
 </code> 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: <code> </code> 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: <code>
 [rsync_slackware_patches.sh:] New patches have arrived for Slackware 13.37 (x86_64)! [rsync_slackware_patches.sh:] New patches have arrived for Slackware 13.37 (x86_64)!
Line 127: Line 144:
 ==== Graphical Network Configuration Services ==== ==== Graphical Network Configuration Services ====
  
-Slackware currently has some alternatives to configure and monitor your network connections. These install a deamon (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//.+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//.
   * You will find [[http://wicd.net/|wicd]] in the //extra// section of the Slackware release tree (the word //extra// means that it is not part of the core distribution and will not have been installed as part of a full installation).\\ After installing the wicd package, you have to make its init script executable so that the network daemon automatically starts at boot: <code>   * You will find [[http://wicd.net/|wicd]] in the //extra// section of the Slackware release tree (the word //extra// means that it is not part of the core distribution and will not have been installed as part of a full installation).\\ After installing the wicd package, you have to make its init script executable so that the network daemon automatically starts at boot: <code>
 # chmod +x /etc/rc.d/rc.wicd # chmod +x /etc/rc.d/rc.wicd
 </code> 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. </code> 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.
-  * Starting with Slackware 14, there is also [[http://projects.gnome.org/NetworkManager/|Networkmanager]]. It will be installed as part of a full install, but the network daemon will not be started by default. Like with wicd, you have to make its init script executable: <code>+  * Starting with Slackware 14, there is also [[http://projects.gnome.org/NetworkManager/|Networkmanager]]. It will be installed as part of a full install, but the network daemon will not be started by default. As with wicd, you have to make its init script executable: <code>
 # chmod +x /etc/rc.d/rc.networkmanager # chmod +x /etc/rc.d/rc.networkmanager
 </code> 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 [[http://slackbuilds.org/network/network-manager-applet/|SlackBuilds.org]].  </code> 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 [[http://slackbuilds.org/network/network-manager-applet/|SlackBuilds.org]]. 
Line 140: Line 157:
 It's recommended that you switch to Slackware's //generic// kernel. This is easy to do but there are a few steps to follow. It's recommended that you switch to Slackware's //generic// kernel. This is easy to do but there are a few steps to follow.
  
-<note tip>What is the difference between a "generic" kernel and the "huge" kernel which has been installed as the default kernel? \\ The "huge" kernel is essentially a kernel which has every hardware driver built in which you might need for a successful installation of your computer. Think of storage and (wired) network drivers, filesystem and encryption drivers and a lot more. All these built-in drivers result in a big kernel image (hence the name "huge"). When this kernel boots it will use up a lot your RAM (relatively speaking... with 1 GB of RAM you will not really be troubled by a few MB less RAM). \\ The "generic" kernel on the other hand, is a kernel which has virtually no driver built in. All drivers will be loaded into RAM on-demand. This will make your kernel's memory consumption lower and the bootup speed a bit higher. The smaller size allows for the use of an initial RAM disk or "initrd". An initial RAMdisk is required in certain configurations, like software RAID, or a fully encrypted hard drive.\\ For now, you need to remember that a "huge" kernel will not support an intial RAM disk, but the "generic" kernel will. We go for maximum flexibility and use a "generic" kernel.</note>+<note tip>What is the difference between a "generic" kernel and the "huge" kernel which has been installed as the default kernel? \\ The "huge" kernel is essentially a kernel which has every hardware driver built in which you might need for a successful installation of your computer. Think of storage and (wired) network drivers, filesystem and encryption drivers and a lot more. All these built-in drivers result in a big kernel image (hence the name "huge"). When this kernel boots it will use up a lot your RAM (relatively speaking... with 1 GB of RAM you will not really be troubled by a few MB less RAM). \\ The "generic" kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand. This will make your kernel's memory consumption lower and the boot process a bit faster. The smaller size allows for the use of an initial RAM disk or "initrd". An initial RAMdisk is required in certain configurations, like software RAID, or a fully encrypted hard drive.\\ For now, you need to remember that a "huge" kernel will not support an intial RAM disk, but the "generic" kernel will. We go for maximum flexibility and use a "generic" kernel.</note>
  
   * You will need to create an initial RAM disk ("//initrd//" for short). The //initrd// functions as a temporary root file system during the intial stage of the kernel booting,  and it helps get the actual root system mounted when your system boots. Run this, as root: <code>   * You will need to create an initial RAM disk ("//initrd//" for short). The //initrd// functions as a temporary root file system during the intial stage of the kernel booting,  and it helps get the actual root system mounted when your system boots. Run this, as root: <code>
Line 154: Line 171:
 # A suitable 'mkinitrd' command will be: # A suitable 'mkinitrd' command will be:
  
-mkinitrd -c -k 3.2.28 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz+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
 </code> Run the script's suggested ''mkinitrd'' commandline (as root) to generate the ''initrd.gz'' image. </code> Run the script's suggested ''mkinitrd'' commandline (as root) to generate the ''initrd.gz'' image.
   * If you have installed LILO (the default bootloader of Slackware), then you will also need to make changes to its configuration file ''/etc/lilo.conf'' by adding a section to your Slackware entry as follows: <code>   * If you have installed LILO (the default bootloader of Slackware), then you will also need to make changes to its configuration file ''/etc/lilo.conf'' by adding a section to your Slackware entry as follows: <code>
-image = /boot/vmlinuz-generic-3.2.28+image = /boot/vmlinuz-generic-3.2.29
   initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz   initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
   root = /dev/sda1   root = /dev/sda1
Line 163: Line 180:
   read-only   read-only
 </code> 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: <code> </code> 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: <code>
-# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.28+# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29
 </code> 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). </code> 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).
   * After making the changes to ''/etc/lilo.conf'' you have to save the file and then run <code>    * After making the changes to ''/etc/lilo.conf'' you have to save the file and then run <code> 
-# lilo+# lilo -v
 </code> to make your change permanent. Then, reboot. </code> to make your change permanent. Then, reboot.
  
Line 179: Line 196:
  
 ==== Configure X If Required  ==== ==== Configure X If Required  ====
-[[http://x.org|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 would need to create a file ''/etc/X11/xorg.conf'' and set the correct options for your graphics card and display resolution. You can use <code>+[[http://x.org|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 <code>
 # X -configure  # X -configure 
 </code> 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''). </code> 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'').
Line 202: Line 219:
 to to
      id:4:initdefault:      id:4:initdefault:
-Note the difference with other Linux distributions; many of those use runlevel 5 for their graphical login. In Slackware, runlevel 5 is identical to runlevel 3 (console boot).+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 [[howtos:slim|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.+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 [[howtos:window_managers:slim|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.
  
 ===== Further Exploration ===== ===== Further Exploration =====
Line 218: Line 235:
 ==== Slackware Documentation ==== ==== Slackware Documentation ====
  
-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.+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.
  
 ===== Upgrading the System ===== ===== Upgrading the System =====
  
-FIXME This section needs to be improved - there are "traps" which can be avoided if you know what they are. +If you have been using Slackware for a while and want to upgrade to the next release once that becomes availablewe have a nice [[howtos:start|HOWTO]] available here: [[howtos:slackware_admin:systemupgrade|Upgrading Slackware to a New Release]]
- +
-If you want to upgrade to the next release of Slackware once that is released, this is how you can do that. <code> +
-# slackpkg update +
-# slackpkg install-new +
-# slackpkg upgrade-all +
-# slackpkg clean-system +
-</code> The "clean-system" command is used in the end. It will remove all packages which were part of the previous Slackware releasebut have been abandoned in the next release. \\ An example of such abandoned package in Slackware 14 is ''ntfsprogs''. Actually it was not removed but renamed... for Slackware that is equal to package //removal plus addition//.  +
-<note warning>Non-official packages which were installed from other sources, are also candidates for removal when you run ''slackpkg clean-system'' ! You should check the list of packages to be removed before you click "**OK**". \\ It is strongly encouraged to use the [[slackware:slackpkg#blacklisting|slackpkg blacklist file]] to safeguard against unintended package removals.</note>+
  
-When tracking [[slackware:current|current]], you should always read the latest ChangeLog 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.+When tracking [[slackware:current|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.
  
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 {{tag>slackware beginners guide}} {{tag>slackware beginners guide}}
 slackware:beginners_guide ()