Concepts

From openSUSE

Contents

Basic openSUSE Linux concepts


This article provides some openSUSE basic concepts and references some basic applications. It is intended for new Linux users who are using openSUSE. This article assumes the new Linux user already has some computer experience.


First Things to Do with One's new openSUSE

Typically, the first thing a new openSUSE user wants to do is start working on one of their pet projects, as soon as their openSUSE is installed. But before one does, it is useful to learn some basics, about how Linux works, to avoid wasting time later. For Linux works in a different manner than the MacOS or the MS-Windows Operating System (OS) versions, and to save time, these differences should be understood.


Free Software


Linux has been developed on a Free-Software concept. When the term "free" is used, it doesn't mean "free" as in "free beer". Instead it means "free" in the sense that one is

  • "free to copy",
  • one has "free access to the source code",
  • one is "free to modify the code",
  • one is "free to give away original version", and
  • one is "free to give away their modified versions".

More can be read about free software here

So why is free (and open source software) software important to a new Linux user? It is important because it drives at a philosophical level how Linux and almost all Linux software is structured.

Linux Kernel & GNU Project

A Kernel is the low level core of the system that needs to interact with the hardware. The free Linux kernel was originally created by Linus Torvalds in 1991. At the time, the GNU Project had created many of the components required for a free software operating system, but its own kernel was incomplete and unavailable. Hence by using both software from the GNU project and the Linux kernel, the basis for operating systems such as openSUSE was created.


Distributions


As mentioned above Linux is only the kernel of the operating system. The complete operating system, is a so called GNU/Linux distribution. It consists of a lot of other software than just the kernel, for example you could be using the K Desktop Environment (KDE) as your graphical user interface, this is not "Linux". This modular build up is what allows for a wide variety of Linux distributions. Coming from certain other operating systems, it can be a bit hard to get used to the concept that not everything in the operating system is simply Linux or Windows, but rather a combination of many, many more or less independently developed projects (called: upstream). When doing trouble shooting it's very useful to understand which part is having the problem.

Of course it is possible for the distributors (for example Novell) to make Linux distributions only because the software is covered by the freedoms mentioned above. Which allows distributors to modify, bundle and redistribute the software.


Software handling in openSUSE (Package Management)


In openSUSE, there are two mainly used kinds of software packages:

  • Tarball (tape archiver) and
  • RPM (RedHat Package Manager).

Some notes about both:

Tarball

The tarball is a bundled/compressed file. Tarballs contain the source code of the program and are mostly comprised of compilation scripts. In addition, a tarball often contains documentation with useful information, how to handle the package, often called "readme.txt" or "install.txt". Often the content of a tarball requires compilation. Common extensions of a tarball are "tar.gz", "tgz" or "tar.bz2".

RPM

Updating software via RPM is the more common software installation method used by the average openSUSE user. RPM stands for RedHat Package Manager, a tool, which installs, updates, uninstalls, verifies and queries software packaged in this format, and also for the files, made by that tool (RPMs).

Why is RPM useful?

In many cases a software developer will create a tarball of his software. The use of a tarball is such, that the user can compile the content, to get the files to the right directories. This is not always as easy as it sounds, it can be tricky and time intense for a Linux beginner. For that reason RPM was created. A RPM can be installed with a single command, in difference to the content of a tarball, which needs more than one command to get installed.

Further RPM aspects:

Creating RPMs is not that easy, often it needs advanced knowlegde in handling source code and source code files. For that reason capable packagers adopted that job and offer their packages to the community.

A RPM is often build for a specific version of the distribution, e.g. for SUSE Linux 9.3, 10.0, 10.1, openSUSE 10.2, etc. A RPM created for SUSE Linux 9.3 may or may not run on openSUSE 10.2 without fail, because software dependencies between SUSE versions can change.

Linux programs or libraries are often built on previous coded software. The reason is, that the programmer wants to save development time. These interdependencies\ramifications can be large, such that software A needs software B, software B needs software C and so on. Finally the application must run; that's why these interdependencies\ramifications needs to be checked, and when the checks fail, thats when there can be dependency problems when installing software.

Software Package Managers (SPMs)

As said, installing Linux software (RPMs) can lead to a dependency problem. To solve such problems, SPMs were created, they handle the installation. If needed, the SPM will get software from CDs, DVDs, file servers, etc.

To get a SPM communicating with an Internet file server, the file server link needs to be added to the SPM. These file servers are referred to as channels or repositories. The SPM can be used with or without GUI.

Such programs are e.g. APT/Synaptic, Smart, YUM, and indeed YaST (produced by SUSE) itself.

Further informations:

Repositories of 3rd party packaged software:

Beside the official repositories there are 3rd party repositories, which contain improved or special versions of RPMs or RPMs with quite new or unknown packages. Popular SUSE Linux\openSUSE repositories are Packman and Guru. If you want to add one of these repositories, look here for a guide.


Multimedia on openSUSE


Reference multimedia - openSUSE out of the box comes very limited for even some very basic multimedia functions (such as playing the proprietary mp3 format with any package other than real player) due to licensing reasons. Hence for a new openSUSE user, who wishes to play mp3 format, play avi files with various codecs, play commercial video dvds, etc .... will need to go to 3rd party packaged repositories of applications, and install versions of these software applications, packaged by various openSUSE rpm packagers (where those software programs packaged by the packagers, work better than the Novell/SuSE versions).

A site that has some guidance on an open source approach to this is the opensuse-community site here: http://opensuse-community.org

Starting in openSUSE-10.3, to simplify the multimedia installation experience, a "one-click" multimedia upgrade method was implemented, semi-automating the upgrade of the multimedia for new open SUSE users.

OpenSUSE-10.3 One-Click-Multimedia-Install: http://opensuse-community.org/Multimedia

Sound

The sound drivers for openSUSE are typically provided by the alsa family of rpm packages. A general theoretical overview of sound on openSUSE is described in Sound-concepts. A basic guide for helping one trouble shoot their openSUSE Linux PC to get audio working is the AudioTroubleshooting guide

Linux shell / Command Line Interface


The shell is a Command-Line Interface, much like MS-DOS was (and the Command Prompt in WinXP is), but with the full power of Linux multitasking available. Dependent on how the shell is entered, it may be full screen, or it may be in a window under a Window Manager. Most common is the "bash shell", where bash is a Unix shell written for the GNU Project. Bash is the default shell on most Linux systems, as well as on Mac OS X and it can be run on most Unix-like operating systems. In the case of openSUSE, a bash shell can typically be opened by starting a "konsole" <ALT><F2> and type "konsole", or by starting an "xterm". A Linux shell is used when interfacing with the lower Linux boot levels (such as run levels 1 to 3). Applications can be started from a shell, which can also be very useful a number of reasons, such as for debugging problems.

The following picture shows simplified version of information and command flow when one user interacts with the computer running Linux.

Image:flow1.jpg




X window – basic concepts


Often a newbie user will read references to X window. X window (commonly known as X11 or X) provides Linux PCs a graphical environment, in which different graphical desktops can run (giving a graphical appearance that is typical of the OS of modern computers, such as seen in the Mac, or in MS-Windows). Without X window one would only have a simple ascii prompt/shell type environment on their Linux PC (with no graphics). In Linux X window, to obtain a user friendly Graphical User Environment (GUI), on top of X window runs a Window Manager, or a Desktop Environment. (Note in a Mac and in MS-Windows, there is typically no such clear distinction between the ascii shell, and the upper level graphical environment, and hence Mac/MS-Windows have only one GUI, while a Linux user can choose from many). More detail on this can be found on this Window Manager and Desktop Environment wiki: Window managers and desktop environments. Three of the more popular desktops for openSUSE are

There are also many other desktops available for openSUSE, with more information here on the openSUSE implemented Graphical user interface (GUI); see GUI One can also find more on X window here:

X window aspects

X window is very powerful, in that its architecture is deliberately structured, with separate "client" and "server" aspects. For a one PC user, both the "client" and the "server" run on the same PC (and hence the this client/server division is transparent). But X window is designed such that the "client" and "server" can be run on different machines. Hence, for example, with X11 and the Secure Shell (ssh) program (see below), an X window application can run on a remote Linux PC, but with the graphics window of the same application being displayed locally on a "local" Linux PC.

Networking With Linux


Linux PC networking with MS-Windows PCs

MS-Windows/Linux file/printer sharing

For file and printer sharing between an MS-Windows and a Linux PC, most Linux users use an application known as "samba", that runs on the Linux machine.

With Samba running, the Windows-to-Linux networking (with there being a Linux PC in the Local Area Net (LAN)) is mostly transparent to the MS-Windows PC user. Thus files and printers can be shared transparently, using standard file/print managers.

Files can also be transfered from the Linux PC to the MS-Windows PC, using KDE & smb (Server Message Block) supported by KDE application Konqueror, and from the MS-Windows PC to Linux PC, using Secure Copy (scp) or Secure FTP (sftp) via packages such as the WINscp freeware software. In openSUSE, scp is not as seamlessly "integrated" as nfs nor as samba.

One can also share printers between Linux and Windows PCs using CUPS and/or IPP.

Linux-PC to another Linux-PC sharing

Linux/Linux file sharing

For file sharing between Linux PCs, most Linux users use an application known as Network File System (NFS), that enables file sharing (including remote directory/drive mounting, such that remote drives are treated as local), etc ...

Instead of using NFS, one can also transfer files using ssh (via the “scp” mentioned above). One ssh network file transfer implementation is “FIles transferred over SHell” (known as “fish”), which can be used to transfer files from Linux PC to Linux PC. KDE's Konqueror File Manager and Gnome's Nautilus and also Midnight Commander file manager, support “fish” network file transfers using a user friendly GUI.

And as noted previous, SFTP (SSH File Transfer Protocol) can be used for transfering files from Linux PC to Linux PC. KDE's Konqueror File Manager and Gnome's Nautilus support “SFTP” network file transfers using a user friendly GUI.

Linux remote Command Shell

With Linux, a remote PC's konsole/shell can be opened on a local PC and thus remote command line applications can be controlled locally. This is possible by using applications such as telnet or ssh. ssh provides more secure data transfers than telnet and is typically preferred.

Linux Remote desktop

There are various ways to do have a remote desktop using Linux. One way is to use Virtual Network Computing (vnc) to remotely access a Linux PC from either another Linux PC, or from an MS-Windows PC. vnc transmits the keyboard and mouse events from one computer to another relaying the graphical display updates back in the other direction, over a network. One Linux application that provides this capability is "x11vnc". A remote desktop can be done using a local LAN, or across the Internet. In the case of using an "MS-windows" PC to access a Linux pc's Xwindow desktop, there are many client applications, some of which are free. The vnc wikipedia link below lists many of the MS-Windows packages.


Linux Directory Structure


The Linux Directory Structure (also known as the Filesystem Hierarchy Standard): In Linux, the files are stored in a directory structure that is significantly different from MS-Windows. Everything in Linux starts from the root directory (represented by / ) and it then expands into sub-directories, instead of having “drives”, as in MS-Windows. Linux sorts directories descending from the root directory / , theoretically according to their importance to the boot process. Typically, upon boot, the system does not know of the existence of different partitions or devices. Instead, different hard drives, and different partitions, are mounted seamlessly into the Linux directory structure, such that they are completely transparent to the user. This is known as the Unified Filesystem. More detail can be found here:

Hardware under Linux


Support for hardware under openSUSE varies. Some manufacturers provide drivers for their hardware, some do not. In many cases free-software enthusiasts have created Linux drivers for hardware. Because some manufacturers have proprietary (and not free) drivers for their hardware, an "out of the box openSUSE" may, or may not, initially include those drivers, and hence may not have initial support for all hardware. One may need to spend some time setting up their hardware. And one may not have to. It simply depends. For example, one's graphics, audio, wifi make work immediately. It may not work. Typically a newbie needs to give their graphics, Internet, and audio their top priorities in setting up their hardware.

If one is purchasing new hardware, it is often useful to check for Linux compatibility HCL prior to purchasing.

Hard Drives: Terminology, Partition Table


In Linux, hard drives are known by different names than what they are in MS-Windows. In openSUSE Linux (prior to openSUSE-10.3) an EIDE/IDE hard drive is known as “hd” and are alphabetized starting with “a” (ie hda, hdb, hdc ... etc ). A scsi/sata drive is typically known as “sd” and are also alphabetized starting with an “a” (ie sda, sdb, sdc ... etc). Various partitions are numbered, staring with the number 1 (ie hda1, hdb1, hdb2, hdb3, hdc1, sda1, sda2). A floppy disk will be known as fd.

Commencing with openSUSE-10.3, through the use of the libata application, EIDE/IDE hard drives also share the sda, sdb ... etc naming convention.

The partitioning of the hard drives in Linux follows the PC standard and is not Linux-specific (that is, the partitioning is the same as in Windows). Every hard drive must have one partition table. There can be 0 - 4 entries in that table. Out of the maximum four entries, 0 - 4 can be primary partition descriptions, and 0 - 1 can be extended partition descriptions. The extended partition holds several logical partitions, its number can be from 1 to 4; the logical partition numbering begins with five. Here is how typically a hard drive is partitioned when there is one hard drive in the PC, used both for Windows and Linux:

Name Filesystem type Size Used for Mountpoint Notes
hda1 NTFS 32 GB Windows OS /win Has been squeezed
hda2 NTFS 8 GB Windows Restore Do not mount Has been moved
hda3 - 80 GB Hold all Linux files - Extended part-n
hda5 ext3 12 GB Linux OS / Logical part-n
hda6 swap 1 GB Extension of RAM - Logical part-n
hda7 ext3 or reiserfs 67 GB Users' files /home Logical part-n


A more advanced version of partitioning (this time using the openSUSE-10.3 libata naming convention):

Name Filesystem type Size Used for Mountpoint Notes
sda1 NTFS 32 GB Windows OS /win Has been squeezed
sda2 NTFS 8 GB Windows Restore Do not mount Has been moved
sda3 - 80 GB Hold all Linux files - Extended part-n
sda5 reiserfs 14 GB Linux OS / Logical part-n
sda6 reiserfs 5 GB User-installed programs /usr/local Logical part-n
sda7 swap 2 GB Swapping - Logical part-n
sda8 ext3 or reiserfs 20 GB Users' files /home Logical part-n
sda9 ext3 or reiserfs 35 GB Users' data /data Logical part-n
sda10 reiserfs 4 GB Encrypted data /enc (no mounting by default) Logical part-n

Again, as reflected above, under openSUSE-10.3 the EIDE/IDE hard drives may be referred to as sdx, as opposed to hdx.

Linux Security


Root / Regular Linux User

In Linux there is a “root” user (which is the administrator) and there are regular “users” (often called “user”). Linux users should always log in as a regular user, and type “su” or “sudo” to obtain root permissions only on an as-required-basis. Keeping root permissions, or indeed logging in as root user as a routine matter, creates a major security risk for the newbie (if their PC is connected to the Internet). It also creates a significant operating risk, in that it is relatively easy for experts and newbies alike, to trash their system when operating with root permissions. An example of such operation is, being su in directory / and having forgotten about that, to attempt to change ownerships of files to user with:

 chown -R sammy:users *


Some super user definitions are:


Printing under Linux


Philosophy of a common printing format

Linux uses a common print format to simplify the support for printing. The general concept of print format under Linux is for an application developer to code the application to print to only one format (the PostScript format), and to have a printer driver (to work with Linux) only have to accept that one format and modify it into a language that the printer accepts. This is very efficient, as it means the application developer only has one print format to support, and it means the printer manufacturer only has one print format to support when writing native code for a driver for Linux.

Hence under Linux, all printers are typically treated as PostScript printers, and the applications usually produce a PostScript output. If a printer does not understand PostScript by itself (which happens in the majority of cases) the Linux PostScript interpreter GhostScript/foomatic is used to translate the incoming PostScript into the printer's own language (PCL, ESC/P 2, ... or something proprietary) with the support of the printer driver.

There is a good theoretical background to printing (using postscript) under an Operating System such as Linux here: http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/III.PostScript-and-PPDs/III.PostScript-and-PPDs.html

PPD Files/PostScript printers

There are many Linux applications which use PostScript Printer Definition (PPD) files to know about the capabilities of printers, so that their printing dialogs can make available all options which the printer and its driver provide and also show additional information about the printer. A PPD is just a text file which exactly describes (in a well-defined format) all supported features of a printer and contains the exact code that needs to be injected into the print jobs to invoke each desired feature. Print software programs can read PPDs, and know how to display the supported features in the printer driver's user interface shown on screen. If the user makes specific choices (like duplex, stapling) the program will know what specific code to inject into the print job and how to work with print device. In addition PPD files can also be used on Windows, Mac, or Line Printer Remote / Line Printer Daemon (LPR/LPD) clients to get access to the printer's capabilities and options.

For every PostScript printer the manufacturers typically provide a PPD file which contains all printer-specific information about the particular printer model. In turn the Linux printing system Common Unix Printing System (CUPS) and LPR/LPD support them natively, with all other printing systems they can be used with the help of a configurable printer filter (Foomatic). Foomatic is a piece of software that transforms PostScript data to the printer's native format, using the PPD as configuration. It needs a low level driver (specific to each printer) to generate the final code. Typically foomatic uses ghostscript in the background, using options according to the PPD file of the printer. CUPS also supports the Internet Printing Protocol or IPP, which defines a standard protocol for printing as well as managing print jobs, media size, resolution, and so forth.

openSUSE printing implementation:

Details on the openSUSE specific printing implementation can be found here:

LSB (Linux Standard Base) DDK (Driver Development Kit):

There is currently development work ongoing to provide distribution-independent driver packages for Linux, called the LSB (Linux Standard Base) DDK (Driver development kit). The intention here is to permit print manufacturers (or anyone else interested) to easily package their printer driver (or any other driver) to make it available as a distribution-independent binary package.

This way users can easily install drivers which their distribution does not ship or only in an outdated version. No compilers need to be installed and no knowledge about building from source is needed. The intention is that packages can easily be un-installed later.

In addition support is planned for fully automatic download of these drivers by printer setup tools. The intention is that as soon as printer setup tools pick up this functionality, printing will "just work" also for printers which are not supported by the distributions.

Additional References


  • Wikibook Linux For Newbies Guide: [1]
  • Wikpedia on Linux [2]