Do not destroy the Debian system!

Debian is a powerful and reliable system, but new users are still very easy to ruin the system, by not doing everything the way Debian does.

Debian is a powerful and reliable system. But new users are still very easy to ruin this system, by not doing everything the way Debian. This article lists common errors that new users have. Some of the things listed here can be done safely, but only if you have enough experience to know how to fix the system if something goes wrong.

The consequences are not always immediately noticeable and may cause future upgrades to be impossible without a complete reinstallation. If the upgrade without reinstalling is very important to you, be careful not to make the errors listed below.

One of the main advantages of Debian is its central repository with thousands of software packages. If you go to Debian after using another operating system, you may be familiar with installing software that you find somewhere on a random website. On Debian, installing software from random websites is a bad habit. It is always better to use software from the official Debian archive if possible. Packages in the Debian repository are said to work quite well. Using only software from the Debian repository is much safer than installing from random websites (it may be easy to encounter malware and other security risks).

Wrong ones to make new users of Debian

  1. Don't create a FrankenDebian!
  2. Do not use the GPU manufacturer installation script
  3. Don't 'have a new one'!
  4. 'make install' may conflict with packages
  5. Don't blindly follow stupid advice!
  6. Read useful guidelines
  7. Do not blindly remove software!
  8. Read the package description before installing
  9. Records
  10. Some safer ways to install software are not available in Debian Stable
    1. Backport package
    2. Build from source
    3. Use chroot, containers and virtual machines
    4. Make the most of the resources

Don't create a FrankenDebian!

Do not destroy the Debian system! Picture 1Do not destroy the Debian system! Picture 1

Debian Stable should not be combined with other releases. If you are trying to install software that is not available in the current Debian Stable release, do not add the repository for other Debian releases. The problem may not happen immediately, but you may have trouble installing the update next time.

The reason this can break the system is because the software is packaged for a Debian release built to be compatible with the rest of the software for that release. For example, installing packages from a buster on a stretch system can also install newer versions of the main library, including libc6. This leads to a system that is not completely testing or stable but a mixture of the two.

Repositories can create FrankenDebian (a type of system created from mixing packages outside Debian with the base Debian system). if used with Debian Stable:

  1. Debian testing release (currently a buster)
  2. Release of unstable (unstable, also called sid)
  3. Debian Ubuntu, Mint or other derivative repositories are not compatible with Debian
  4. Ubuntu PPA (Personal Package Archive)

Do not use the GPU manufacturer installation script

Debian includes free open source drivers that support most video cards. These free drivers provide the best integration with the rest of the Debian system and work quite well for most users.

If you absolutely must have a proprietary closed source source driver, don't download them directly from the manufacturer's website! Installing the driver in this way only works for the current kernel and after updating the next kernel, your video driver will not work until they are reinstalled manually.

Fortunately, Debian has a way to install proprietary video card drivers using packages in the repository. Installing the driver this way will ensure that the drivers continue to work after updating the kernel.

  1. AtiHowTo has instructions for using free and open source drivers for ATI / AMD video cards. Link refer to: https://wiki.debian.org/AtiHowTo.
  2. ATIProprietary has instructions for installing source drivers that close ATI / AMD in a Debian way. Link to reference: https://wiki.debian.org/ATIProprietary.
  3. NvidiaGraphicsDrivers has instructions for installing Nvidia source driver in the Debian way. Link to: https://wiki.debian.org/NvidiaGraphicsDrivers.

Don't 'have a new one'!

Do not destroy the Debian system! Picture 2Do not destroy the Debian system! Picture 2

The reason that Debian Stable is so reliable is because the software is tested and fixed before it can be used. This means that the latest software version is usually not available in Stable repository. But that doesn't mean this software is outdated!

Before trying to install the latest version of some software from somewhere other than the Debian Stable repository, here are some things to note:

  1. Debian backport security fixes and add new features, evaluate the software by comparing the version number of the Debian package to the upstream version number.
  2. The latest version of the software you are trying to use may also present a new error.
  3. Installing software from non-official Debian repositories will not be protected by the Debian Security team.

'make install' may conflict with packages

Compiling software from source tarballs is easily downloaded from the software website, but it's not always easy to remove it later. Typically, the source code includes instructions for using commands such as:

 ./configure && make && make install 

When installing the software in this way, you will not be able to delete the software using apt-get or Synaptic. APT package system can only delete software installed by this system. Even worse, software installed in this way can sometimes conflict with software available for Debian.

Software installed in this way also does not benefit from security updates like other Debian packages. If you want to update your system without having to manually compile and reinstall the software for each update, use the Debian packages.

Script make install can make invalid assumptions about where the binary file is compiled and its associated files will exist in the file system and the permissions are set to run them. Software installed in this way can also replace software that is critical to system and package maintenance, making it difficult to repair the system with standard Debian tools.

Don't blindly follow stupid advice!

Unfortunately, there are lots of silly advice on the Internet. The guides found on blogs, forums and other websites often include many guides that can destroy your system in different ways. Don't just follow the first advice you find, or the guide seems easiest! Take the time to read the documentation and compare the differences between the instructions.

It is better to take the time to find the correct way to do something, not to spend time fixing a broken system. Do not execute any commands without understanding what they are for!

Blog posts and forums will last forever. However, these guidelines may have been secure a few years ago, but not now. If in doubt, continue to research and read the documentation for the version you are using.

Read useful guidelines

Often reading a guide is just enough to have a general idea of ​​how to install or use an application. Almost all the software that comes with Debian has at least some available documents. Some places to find these documents include:

  1. Debian documentation homepage: https://www.debian.org/doc/
  2. The Debian Administrator's: https://debian-handbook.info/
  3. The apropos command will help you find instructions pages.
  4. Man command to read instructions pages for commands you do not understand.
  5. Some software has its own -doc package containing documents.
  6. Every Debian package installed on the system has a directory in / usr / share / doc, usually containing the README.Debian file , with information about differences from the upstream version of the software along with additional documentation.

Do not blindly remove software!

Sometimes when you remove a package, the package manager will also remove other packages. This is because additional packages depend on the package you are trying to delete.

If this happens, the package manager will show you a list of packages that will be deleted and ask you to confirm. Be sure to read this list carefully! If you don't know what some packages need to delete, read the description for each package. When in doubt, take more time to study. Some resources can help you research packages including:

  1. https://www.debian.org/distrib/packages
  2. Apt-cache (8) commands (reference link: https://manpages.debian.org/stretch/apt/apt-cache.8.fr.html):
    1. apt-cache show for viewing package information
    2. apt-cache policy to view version information for a package
    3. apt-cache depends to see the package dependencies
  3. Aptitude commands (8) (reference link: https://manpages.debian.org/stretch/aptitude/aptitude.8.fr.html):
    1. aptitude why to show an incomplete reason why a package is installed
    2. aptitude why-not to show why the package cannot be installed
  4. Use the --simulate option with apt-get and aptitude, like other commands in this list do not need to be run as root:
    1. apt-get --simulate remove

Read the package description before installing

You should read the description of the packages before installing them. Sometimes the software will have different packages available in the Debian repository and each package is configured in a different way. Read the package description and search for the same package name to make sure you install the package you want.

This point can be particularly important for packages that install kernel modules.

Records

It is easy to forget the steps taken, when doing something on your computer, especially a few months after you upgrade the system. Sometimes, when you try a few different ways to solve the problem, forgetting any method that succeeds the next day is completely possible!

It is best to note the installed software and the configuration changes made. When editing configuration files, you should also add comments to the file, explaining the reasons for these changes and the date they were taken.

Some safer ways to install software are not available in Debian Stable

Sometimes, it is necessary to install software that is not packaged for Debian or newer than a stable release package. Here are some ways to minimize the risks mentioned above.

Backport package

Do not destroy the Debian system! Picture 3Do not destroy the Debian system! Picture 3

Newer versions of common packages can be found in the Debian Backports repository. These packages are not tested as well as those included in the Debian Stable release and should be installed at a moderate level.

Those who take more risks can sometimes create backups of the latest Debian software. Although it is not without risk, self backport is usually safer than other methods. When backport itself fails, it shows that manually installing the software (for example with make install or an installer script) can damage your Debian system.

  1. SimpleBackportCreation: https://wiki.debian.org/SimpleBackportCreation
  2. Alternative instructions are available in the form of interesting pieces of information from the Debian IRC bot: https://wiki.debian.org/IRC/DpkgBot
  3. Also on IRC, judd bot provides checkbackport command to provide some guidance on whether or not to backport by querying UltimateDebianDatabase.

Build from source

If you are building software from a source other than Debian, you should build and run it as a normal user, in that user's home directory. If you keep sensitive, valuable, or irreplaceable data in the home directory, you may need to create another user account for this purpose.

Automake and other build systems can install self-build software in non-standard locations. Use root or "sudo" to install self-build software into / usr / bin or other standard locations where the usual package of files is a bad idea. Instead, it is almost always possible to install to the home directory (using ./configure --prefix = ~ / .local or similar). If you understand how to edit Makefiles, you can change the Makefile file in a way that renders make install useful for the system or add a prefix option = ~ / .local.

If you want to provide software for all users, do not allow the software to install itself on the / usr directory hierarchy , since only Debian packages are created there. Installing software into / usr / local will help the software be available to all users and will not interfere with the package manager. The stow package can be useful for managing software installed on / usr / local.

Use chroot, containers and virtual machines

Another strategy for using software that is not available in Debian Stable is to run the software in the virtual Debian system in the directory or image file. This allows software to be installed on a virtual Debian system without any impact on the main system or Debian server running your computer.

Debian includes many tools that provide different levels of isolation to the server operating system. Some tools include:

  1. Schroot
  2. LXC
  3. gnome-boxes
  4. libvirt and KVM
  5. Package systemd-container for machinectl and systemd-nspawn container commands
  6. Docker, the real standard for managing containers with thousands of built-in images and applications on the Docker hub
  7. Flatpak - see below
  8. snap - see below

Flatpak

Some applications and games are also available in the new Flatpak package format. Flatpaks can be installed locally by users who do not have root access and do not interfere with the Debian package system. Flatpak applications can also run in the sandbox. A flatpak package is available for Debian. Gnome-software can update and install the Flatpak application with the gnome-software-plugin-flatpak package installed. For more information, see the FlatpakHowto wiki: https://wiki.debian.org/FlatpakHowto

Snap

Another option is the Snappy system developed by Canonical, which provides support for Ubuntu. Snap is basically Flatpak-like but existing central snapcraft repository has more packaged apps than Flathub.

Make the most of the resources

Do not destroy the Debian system! Picture 4Do not destroy the Debian system! Picture 4

When looking for support, it is important to remember that Debian is a volunteer project and people will tend to help more, if you are polite and make the effort yourself. Here are some general guidelines to help you get help when you need it:

  1. First, investigate the problem yourself, including reading documents and using search engines.
  2. Provide details and ask smart questions at: http://www.catb.org/~esr/faqs/smart-questions.html.
  3. If you feel frustrated, don't show your attitude to volunteers trying to help.
  4. Don't expect 'hand-in-hand', if you need a step-by-step guide, it's a sign you need to learn more by reading the manual.
  5. If you know how to answer a question from another user, you are encouraged to comment!
  6. On IRC, in particular:
    1. Don't click after a few words, so it's hard to follow.
    2. Please wait patiently for answers (people often disappear right before someone answers your question).
    3. Use https://paste.debian.net/ instead of pasting directly into the channel.
4 ★ | 5 Vote