Table of Contents

Configure seu novo sistema Slackware

Vamos supor que você leu O guia de instalação, e você tem uma instalação limpa do Slackware em sua máquina com a qual você está satisfeito.

Este guia para iniciantes tem como objetivo colocá-lo firmemente no caminho do Slackware. Se você instalou o Slackware pela primeira vez, poderá se assustar com a visão do cursor piscando no login do console. Deixe esta página guiá-lo pela configuração inicial de um sistema Slackware recém-instalado.

Antes de continuarmos, é importante perceber que o gerenciador de pacotes do Slackware não executa nenhuma verificação de dependência. Se você é novo no Slackware, execute uma instalação completa (com a possível exceção do Série KDEI ) poderia evitar muitos problemas mais tarde.
A recomendação oficial do Slackware 1) é “Se você tiver espaço em disco, recomendamos que você faça uma instalação completa para obter melhores resultados”.

Visão geral pós-instalação

Quando o Slackware for iniciado pela primeira vez após concluir a instalação e a reinicialização, você notará que ele é inicializado na tela de logon do console - e não na tela gráfica de logon que você pode esperar do uso de outras distribuições. Não deixe que isso te desencoraje. É o primeiro estágio de uma experiência de aprendizado que o tornará muito mais versado no Linux depois de algumas semanas.

A instalação não ofereceu a criação de uma conta de usuário. Nesta fase, existe apenas a conta “root”. Você deve se lembrar da senha root, que você definiu no final do procedimento de instalação. Entre como “root” agora - você se encontrará em um prompt de raiz do console “#”.

Então agora o que? O usuário “root” não é a conta que você usará como rotina. Raiz destina-se à manutenção e configuração do sistema, atualizações de software e similares.
A primeira coisa a fazer é criar uma nova conta de usuário para você, sem os privilégios de root. Depois disso, é hora de começar a considerar a instalação de “Drivers gráficos proprietários” “(se você possui uma placa Nvidia ou Ati), configurando uma conexão de rede sem fio ou iniciando um ambiente de desktop gráfico . Há muito o que você pode fazer com o Slackware! Vamos começar com o básico.

Crie uma conta de usuário

A primeira coisa que você precisará fazer é criar sua própria conta de usuário não raiz. Existem duas maneiras de fazer isso, ambas no console. A maneira recomendada é usar os recursos interativos do Slackware.adduser script, portanto:

# adduser

e siga as instruções. Leia a página gerenciamento de usuários para obter mais detalhes sobre o script adduser. Você também pode usar o programa padrão não interativo do Linux useradd:

# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /bin/bash slacker

Feito isso, você pode fazer login na sua conta de usuário.
Faça logoff da conta raiz (digite logout no prompt raiz) e faça o login usando a nova conta que você acabou de criar. Agora vêm as aventuras realmente interessantes!

Faça o Slackware falar seu idioma

O instalador do Slackware é somente em inglês e também assumirá que o inglês é o idioma em que você deseja que os programas do seu computador sejam endereçados. Se você não fala inglês e deseja que o seu sistema Slackware “fale” com você no seu próprio idioma, consulte nosso artigo de instruções”Localização: Adapte o Slackware ao seu próprio idioma

Configurar um Gerenciador de Pacotes

Agora que você tem o Slackware em execução, considere gastar um pouco de tempo cuidando da boa saúde do seu computador. O software que foi instalado como parte da versão do Slackware que você está executando, pode desenvolver vulnerabilidades. Quando essas vulnerabilidades são críticas para a saúde do seu computador, o Slackware geralmente publica uma versão corrigida do pacote de software. Esses pacotes corrigidos são disponibilizados on-line (no diretório /patches do lançamento) e anunciado no Lista de discussão do Slackware Security.

Você tem várias opções para manter sua instalação do Slackware atualizada. Não é aconselhável tornar o processo de aplicação das atualizações de segurança totalmente automático, mas é possível fazer isso usando uma tarefa cron.

slackpkg

Sua melhor opção é usar slackpkg,que é um gerenciador de pacotes além do próprio Slackware pkgtools. Antes que você possa usar slackpkg você precisará definir um espelho online a partir do qual ele fará o download das atualizações no seu computador.

Uma lista de espelhos disponíveis para a sua versão do Slackware pode ser encontrada neste arquivo:

/etc/slackpkg/mirrors

Abra o arquivo em um editor de texto como nano ou vi e descomente a single mirror URL. Verifique se o URL menciona o número do release da versão do Slackware que você está executando! Além disso, escolha um espelho que esteja perto de você ou que você saiba que é rápido. Quando você tiver feito isso, você precisa inicializar o slackpkg's banco de dados executando

# slackpkg update gpg
# slackpkg update

Observe que o gerenciamento de pacotes é feito com o usuário ”root“!

Você precisará atualizar o banco de dados slackpkg periodicamente, quando aprender sobre a disponibilidade de novos patches para sua distribuição. Depois de atualizar o banco de dados, você pode fazer o download e instalar as atualizações. Mais uma vez, veja a página slackpkg para obter diretrizes sobre o uso desta ferramenta.

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:

# slackpkg update
# slackpkg install-new
# slackpkg upgrade-all
# slackpkg clean-system

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.

The slackpkg clean-system command regards any 3rd package as a candidate for removal! Therefore, be smart with your blacklist (/etc/slackpkg/blacklist)

Watching for Updated Packages

The Slackware Essentials book has a chapter about keeping up to date. It would be good if you read it now if you have not done so already.

Configure your Network

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.

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.

Traditional Network Configuration

Wired Network

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.

Wireless

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.

Graphical Network Configuration Services

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.

Switch to a generic kernel

It's recommended that you switch to Slackware's generic kernel. This is easy to do but there are a few steps to follow.

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.
  • Have a look at mkinitrd manual page (man mkinitrd) for more information.
  • If you use grub or another bootloader, then make changes which are applicable to the program you use.
  • If you try to use the generic kernel without creating an initrd.gz, then booting will fail with a kernel panic.

Start a Graphical Desktop Environment

Configure X If Required

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).

Non-free Display Drivers

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“.

Choosing a Desktop Environment/Window Manager

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.

Graphical Login

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.

Further Exploration

The Command Line

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.

Mixing 64-bit with 32-bit

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.

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.

Upgrading the System

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.

1)
veja o Slackware-HOWTO na raiz do DVD ou CD1