One of the most important tasks of an administrator is the administration of the software, i.e. the installation, the uninstallation and the updating of the installed software – also of the system.
Linux administrators have it much easier than those of Windows, because Linux systems are not just simple operating systems like Microsoft Windows which is only a basis to install other programs but a distribution. This means a distribution provides in addition to the operating system further possibly needed software in so-called repositories which can then be installed/uninstalled and updated very easily via the package manager.
The advantages are
Customized software – the software is adapted to the operating system as well as to the computer architecture
Simple update – in contrast to Microsoft Windows not only the operating system itself but all installed software is kept up to date via the package manager
Simple search – you simply search via the package manager of the system and do not have to plague yourself for a long time in the internet
Security – Software from the repositories are not contaminated by malware or spyware
Stability – you can test software – install / uninstall as much as you want – maybe you know this problem under Windows – by frequent install / uninstall the system becomes slower and slower, under Linux this is not the case because always the previous state of the system is rest.
How to manage software under Debian (Ubuntu, Linux Mint) . )?
There are two basic ways to manage software under Debian:
Graphical – with a graphical program such as Synaptic, Software Center, Muon. Shell – on the shell (command line), it has the advantage – everything is much faster and on a server you don’t have a graphical interface anyway
We want to become professionals, so we start with the shell, important here as well as on the graphical interface – all commands are executed as administrator (root), this means you are first started with the command:
or under Ubuntu, Linux Mint. with each one placed in front of the command:
APT (Advanced Package Tool)
Apt is the basic package manager of Debian, so also Ubuntu, Linux Mint etc., all graphical programs use Apt in the background. Apt is a collection of different tools which in turn is based on the tool DPKG – which we will get to know later. With APT you can install software directly from the Internet, i.e. from the repositories, you only have to tell the tool what to do.
Apt is very easy to use and comes with a few commands, these we will now learn:
This command synchronizes the software versions on the local system with those on the servers on the Internet, it should be run once at the start of managing software.
This command is used to search for software, as a "search word" you can now either enter the name of the software you are looking for or simply a term what the software should be able to do or what file types the software should be able to handle. Presented is a list of hits by the software name and a short description.
This command is used to view a more detailed description of a package, such as from the list obtained from the previous command.
This command installs the package specified by "packagename" specified software package. Now apt shows the package to install, the file size the software package will occupy on disk and the download amount, with a "j" is confirmed, with an "n is aborted. Now it is possible that a package you want to install needs additional packages to work – such packages are called "dependencies". If a software needs more dependencies, Apt shows this and asks for them, again with "j" to confirm or with "n abort.
APT can also be used to install several packages at the same time, just separate them with a space.
This command reinstalls an already installed package, for example when an existing package has been corrupted by a bug and no longer works.
this command uninstalls the package named by "paketname" indicated software package.
Here it is also possible to specify several packages at the same time, separated by a space character.
Many software packages store configuration files under /etc, the previous command will not delete these files during an uninstall, this command will also delete these files. In and of itself such configuration files are not a problem – but then the story under /etc gets confusing very fast.
Again, it is possible to specify several packages at once, separated by a space.
This command updates the package lists, this means Apt checks the repository servers for new software, updated packages and so on.
This command updates every available update on the repositories, this means every installed software for which there are newer versions will be updated, no matter if it is the system itself, user software, drivers or games.
This command shows all available upgrades.
This command actually works like "apt-get upgrade" – but it has a more profound effect and is used especially when updating a distribution from an older to a newer version.
Like "apt-get -u upgrade" this command displays all packages that can be upgraded.
The package manager downloads the software packages from the repositories you want to install or update and stores them under /var/cache/apt/archives, these remain after the installation – for example if you want to reinstall the software or use it for other computers so you don’t have to download it again. However, these take up some space over time. To delete these installation files use this command.
As with the previous command, this command deletes installation files, but only obsolete files – so current ones are kept.
This command is used to mix the packages from different Debian versions. As many people know the development of Debian is done in three stages "unstable, "testing" and "stable (see also pinning). So for example under "stable a package from "testing or "unstable" install. The versions from which you want to install additional software must be stored in the file /etc/apt/sources.list should be listed.
DPKG (Debian Package)
DPKG is the basic Debian package management program, even the extensive APT uses DPKG in the background to install and uninstall packages. DPKG is actually only used by the administrator himself when he wants to install a package that cannot be found in the repositories – such as the Opera browser. DPKG is also easy to use:
This command installs the package named by "packagename" specified package, but in contrast to APT you have to specify the whole name with the version name (just specify the package name and press the tab key). Here it could be that the package to be installed needs additional dependencies, but these are not installed automatically by DPKG, this is done by the following command:
This command repairs / installs needed dependencies from the previous command.
This command uninstalls the package named by "paketname" specified package, in this case you don’t have to specify the version of the package.
As we have already learned under APT, many programs store their configuration files under /etc, these are not automatically deleted when uninstalling, if you uninstall a package with this command, the unneeded configuration files also disappear.
If one or more packages were not installed correctly due to missing dependencies, this command will fix it.
This command lists all installed software packages.
Graphically using Synaptic
Synaptic is the most professional and comprehensive package manager for Debian, Ubuntu, Linux Mint etc.. Even if this graphical interface for APT seems a bit confusing at the beginning – it is easy to use and every single software package can be found here.
The operation of Synaptic is as said very simple, the first thing you should do is to compare the package lists of the local system with those on the servers of the repositories to find out if there are new versions of installed software – this is done by clicking on "Reload" (the blue arrow turning in a circle on the far left). If this is done, you will find a column with the software categories on the left, in the middle you will find the software contained in a category – if you mark a package here with the mouse, the exact description is displayed below it. Under the categories you will find more buttons to search for packages more precisely.
Software search – As already described, you can simply browse through the package lists on the off chance, or you can search specifically for the desired software using the "Search" button (the magnifying glass), by clicking on it a search window opens in which you simply enter the name of the desired software, something the software should be able to do or the kind of files the software should be able to handle. The result list will be displayed in the middle of the screen. The "Quick Selection Filter is used to search only in the package name – not in the description, furthermore it must be noted that only in the currently opened category is searched for.
Install Software – Which needs some commands on the shell – here the click is enough. Once you have found the appropriate software you will find a small box in front of the package name, if it is white the software is not installed, if it is green the software is installed. Just click with the left mouse button in this box so a window opens with the available options, to install you now simply select "mark for installation". Now it can be that the selected software package needs further packages – so-called dependencies, this is then indicated in an automatically popping up window, click here likewise on "mark for installation". Once this is done, you will find the "Apply" button in the toolbar – You can now easily search for additional software you want to install or uninstall (see below) and mark these changes or simply click on the "Apply" button click. Now a window will open showing the changes made – including the packages with the changes, the download amount and the space the packages will take up on your hard drive. Click on "Apply and the download of the packages is started, if the download is finished the installation window opens in which you can easily check the checkbox "close this window after . close this window" You can now activate the video see-through display by clicking on "Details" click watch the installation process. Normally, the administrator is not required to intervene here – unless a password has to be created by you, as for example when installing the MYSQL database.
Uninstall software – Uninstalling software is the same as installing it, except that you can select "Mark for uninstallation" by clicking the box in front of the package name, then click on "Apply.
Update Software / System – You can update individual software by simply clicking in the box in front of the package name and "mark for update" as above and also click on "Apply or update the whole system – the system and all the installed software by simply clicking on "Mark all updates" in the toolbar and then click on "Apply.
Compiling is the most important part of installing software under Linux, normally you only do this if you need software that is not available in the repositories (which is very rare), you need a newer version of the software you need or a certain driver is not available in the repositories (which is also very rare).
Compiling is now called translating the source code of a program or driver written by the developer into a working program. Why doesn’t the developer or the distributor of the system do this?? – The question is easily answered: there are many distributions, there are many architectures, there are many package formats – if the developer now has to create packages for all possible distributions, package formats and architectures, he has no time left for his real work – the development of his software, the distributor itself – e.g. the ones from Debian add new software packages from each Debian release to release (under Wheezy there are about 36 at the moment).000) and there are more and more.
How to install (compile) software from the source code you can see here Compile
Some software you find on the internet is available in shellscripts which unpack themselves. Such software are often games or also some other software. The files are then called for example "packagename.sh", "package name.run", "package name.bin". The installation succeeds most simply over the Shell depending upon how one wants, as Root the package is installed system-wide and as normal user in the own Home directory. The command for the installation is then quite simply
"package name.sh" you simply enter the real name including the version (just enter the name and press the tab key). After confirming with the Enter key, the installation routine starts which usually runs graphically.
Also there are files with the file extension".run" end, these are then simply per:
Get all software (unlock sources)
Not on every system every available software source is unlocked – this is especially true for non-free software, such sources you must then simply unlock first, this can be done via the file /etc/apt/sources.list with a text editor (as root) – see: Repositories
Or with the respective graphical package manager, under KDE for example with Muon package manager.
Simply click on the menu item "Settings / Set up software sources":
and activate the checkbox in front of "Multiverse" – after clicking on "Close the package databases will be reread and the software like flashplayer and more codecs are available via package management, also under synaptic you will find the necessary entry. Under Ubuntu this is usually not necessary – here you simply click on "more information" in the software center and in it on "use this package source.