Managing processes

ps displays processes’ status. Syntax is as follows:

                       ps [options]

ps supports three different types of options:

  • Unix98: may be grouped together and are preceded by a single dash
  • BSD: may be grouped together and must not be preceded by a dash
  • GNU long: never grouped together, preceded by two dashes

You can change default behavior by setting the PS-PERSONALITY environment variable to posix, old, Linux, bsd, sun, digital.

By default, ps displays only processes run from its own terminal. -A and -e options display all processes and -x displays processes owned by the user who gives the command.  Continue reading “Managing processes”

Managing libraries

One of the most important libraries is the C library (libc); another type of common library is associated with GUIs, often called widget sets. The GTK+ and Qt are the most popular.

Linux use the GNU C library (glibc); the main file is called /lib/libc.so.6 or /lib64/libc.so.6 (usually this is a symbolic link to another file).

Most programs use their libraries as shared libraries (aka dynamic libraries). Linux shared libraries have a .so or .so.ver extension (.so = shared object). Linux static libraries have a .a extension.

  • Shared libraries can be incompatible but you can keep multiple versions
  • Programs must be able to locate shared libraries so you most adjust config files and environment variables
  • If an important library becomes inaccessible, you can have severe system issues

Continue reading “Managing libraries”

Converting between package formats

alien can convert between RPMs, DEBs, stampede and tarballs. alien requires that you have appropriate package manager installed.

Its syntax:

alien [options] [file]

e.g.:

alien –to-rpm [package].deb

If you use Debian-based systems and want to install a tarball but keep a record of the files it contains in your Debian database:

alien –install [binary.tar] .tar.gz