Latest Computer Issue

Linux Versus BSD With A Little Focus On OpenBSD

What is a BSD Unix?

This article is not about the history of Unix; however, Unix is such a complex issue that it deserves few words in this respect: BSD family of Unix systems is based upon the source code of real Unix developed in Bell Labs, which was later purchased by the University of California. Thus, the name of the family of Unix systems called BSD is derived from “Berkeley Software Distribution”. The contemporary BSD systems stand on the source code that was released in the beginning of 1990′s (Net/2 Lite and 386/BSD release).

No one person or any entity owns BSD. Enthusiastic developers create it and many of its components are open-sourced.

BSD is behind the philosophy of TCP/IP networking and the Internet thereof; it is a developed Unix system with advanced features. Except for proprietary BSD/OS, the development of which was discontinued, there are currently four BSD systems available: FreeBSD, NetBSD, OpenBSD and Mac OS X, which is derived from FreeBSD. There are also various forks of these, like PC-BSD – a FreeBSD clone, or MirOS, an OpenBSD clone. The intention of such forks is to include various characteristics missing in the above BSD systems, on which these (forks), no matter how well they are designed, only strongly depend. PC-BSD, for example, has more graphical features than FreeBSD, but there are no substantial differences between these two. PC-BSD cannot breathe without FreeBSD; FreeBSD or OpenBSD are independent of one another.

What is Linux?

Albeit users like to use the term “Linux” for any Linux distro including its packages (Red Hat Linux, Mandrake Linux, etc.), for IT professionals Linux is only the kernel. Linux started in 1991, when its author, Linus Torvals, began his work on a free replacement of Minix. Developers of quite a few Linux system utilities used the source code from BSD, as both these systems started parallelly in about the same time (1992-1993) as Open Source.

Today, there are a few, if not many developers of their own kernels/operating systems (FreeDOS, Agnix, ReactOS, Inferno, etc.), but these guys simply missed the right train in the right hour. They did not lose anything except for the fact that they may be even better programmers, but without the public opinion acknowledging this at large. Linus built his fame also from work of many developers and he went on board in the right time. Linus deserves a credit as a software idea policy maker and he helped very much in this respect.

(Open)BSD vs Linux

It is often difficult to say what is better if you compare two things without regarding the purpose of their use. Mobile Internet may appear better for someone who travels often, but for people working at home such mobility is not necessary. In this view, it is a stupid question when someone asks: “What is better, a mobile or static Internet?” It all depends…

If you compare Linux and OpenBSD in their desktop environment features, Linux offers more applications than OpenBSD; but in a server solution BSD systems are known to be robust, more stable and secure, and without so many patches distributors release soon after their new version of Linux slithered to light.

BSD systems are based upon real Unix source code contrary to Linux, which was developed from scratch (kernel).

Differences between BSD and Linux

1) BSD license allows users/companies to modify a program’s source code and not to release changes to the public. In other words, BSD licenses allow commercial use and incorporation of a code into proprietary commercial products. This is how Microsoft incorporated BSD networking into their products and how Mac OS X earns money through muscles of FreeBSD.

Linux uses GPL license for most of the time (applications in Linux can also have a BSD license – or any license; it is up to developers how they decide). With a GPL-licensed program anybody can change the source code, but he or she MUST share it with the Open Source community to make sure that everybody will benefit from such a change.

2) BSD has the so-called “core system” (without packages). The core system consists of basic utilities (like ssh, fdisk, various commands like chmod or sysctl, manual pages, etc.) and anything beyond this is strictly seen as an add-on. Linux (not only the kernel, of course) is usually packaged as the whole system where this difference is not seen.

3) On BSD systems, all add-on packages are strictly installed into the /usr/local directory: documents to user/local/share/docs/application_name; themes and other things to /usr/local/share/application_name; binaries to /usr/local/bin/application_name. By application_name we mean a program’s name, so if you install IceWM, for example, its binary will be here: /usr/local/bin/icewm. With Linux, on the other hand, all applications get mostly installed into the /usr/bin directory.

4) BSD systems use the system of “ports”, which are fingerprints of applications in the /usr/ports directory, where a user may “cd” and execute a make command, which will download, via a directive contained in such a fingerprint’s code, the application’s source and the system will compile it as well. “Ports” are actually add-on packages for BSD systems and they are also packaged in packages repository of a concrete BSD system. They can be installed as binaries, too, with use of the “pkg_add” either directly from the Internet or locally. But “ports” have that advantage that if an author of any package makes a new version, a user can immediately get its newest/updated version. Packages released for a particular BSD version (like OpenBSD 4.1) are not updated and users have to wait for a new BSD release (like OpenBSD 4.2).

5) BSD systems have also their stable version. With FreeBSD, for example, you have a FreeBSD-Release (a version that can be used normally), FreeBSD-Stable (system more profoundly audited for bugs and security holes), and a development version – Current, which is not stable and not recommended for a regular use. Some Linux distributions started to imitate this philosophy, but with BSD systems this way of making distributions has become a rule.

6) Of course, the kernel is absolutely different.

7) BSD has FFS file system; it is the only file system on BSD’s contrary to Linux, where you can use dozens of file systems like ext2, ext3, ReiserFS, XFS, etc.

8) BSD systems divide their partitions internally. This means that after installing a BSD system to a hard disk, programs like fdisk, Partition Magic, Norton Ghost and many others will not see this internal division of a BSD (FFS) disk; thus, repartitioning of a disk is not such a pain when administrators require a rigorous partitioning (for /home, /tmp, /var, /etc directories). As a consequence, the naming convention also differs a little: a disk – /dev/ad0s3b in FreeBSD indicates that you deal with “slice” 3 (“s3″), which is the equivalent of Linux /dev/hda3; the internal “partition” has the name of a letter: “a”, “b”, “e”, etc. (“b” is a swap partition). BSD systems also use different naming conventions for devices (disks, etc.).

9) Unless you make a good kernel hack, BSD systems can only be installed into the primary partition. This is not the rule with Linux. However, as BSD systems offer the above-mentioned internal division of partitions, this is not any pain. PC architecture for disks (IDE) follows the rule that you can have only four primary partitions. We will illustrate this on Linux: /dev/hda1 (note: first partition on master disk on first IDE channel), /dev/hda2 (second partition), /dev/hda3 (third partition), /dev/hda4 (fourth partition). PC architecture allows creation of the so-called logical disk on a physical disk (/dev/hda5, /dev/hda6, etc.). You can have as many logical disks/partitions as you wish and you can also install Linux into these “logical disks”. On the other hand, installing a BSD OS into such a “logical partition” is not normally possible.

10) System configuration is manual for most of the time, but various clones like PC-BSD break this convention. The manual approach is a very good thing, as administrators have everything under control without being pushed to waste time in a labyrinth of bloated configuration menus. A good comparison is to imagine a car mechanic repairing the car’s engine covered by a thick blanket. To give you even a little better example – you will hardly find a Linux distro that does not have a default X startup (graphical environment). Of course, you can switch off the X environment during the installation configuration, but if you keep forgetting like me and forget to switch this off, or you have difficulties to find it in the menu somewhere, you realize that most Linux distributors do indeed impose on us only one approach – to put our fingers first on the thick blanket, then on the engine. If you are a good administrator, you do not usually trust vendors who program you how to use Linux – you are the boss and you must have your own freedom. However, in most cases you lose few hours instead by deactivating various services, which are, unfortunately, not even necessary but almost always activated by default. Linux is praised both for being a good desktop and server, but administrators of a good server do not need X. The more software is stored on your hard disk, the more security problems you will face, because it is impossible to audit every package in every unthinkable situation. Good and secure systems are always tight, light and simple.

11) All BSD systems have a Linux emulation support. Running BSD binaries on Linux is a little harder.

12) BSD systems have less support from driver vendors, thus they lag behind in this view (they are not worse, but many vendors support only Microsoft and Linux). With a BSD system you must carefully research the Internet for supported products/chipsets before purchasing any hardware.

13) BSD systems do not use the Unix System V “runlevel scripts” (initialization startup scripts) like Linux.

14) BSD kernels can be set to several security levels. This is also possible with Linux, but BSD’s have taken a very good care of this kernel-tuning feature, which makes it even impossible to change something in files in higher security levels – you cannot delete them.

15) BSD’s have everything under one ROOF. Various Linux programs are often not even compatible with other Linuces. For example, if you install a SuSE RPM package on Mandrake, it may not work. BSD’s have one solid crown of power. If you move from Linux to FreeBSD, you will soon find out that you got out of this chaos. Do you want a package? Just visit: http://www.freebsd.org/ports/ and download it. Unless its developer made some programming errors, it will always work.

16) Generally, BSD systems boot and reboot faster than Linux. Linux can do this, too, but it must be tuned. It is very surprising that Linux is shipped, on the one hand, on huge DVD’s and, on the other hand, it has a compressed kernel. BSD systems do not use (but they can) a default kernel that is compressed, thus the system boots always faster. As I mentioned earlier in this article, Linux vendors program users to use various, often unnecessary services. I do not need SAMBA (file and print services) and many other things as well. Linux reboot process takes longer because various services running on Linux need time for deactivation. Many Linux users do not even know what is the purpose of these services.

17) In comparison to BSD, most Linux distributions are overbloated. Few good users noticed this some time ago and a new trend in the Linux world started with ideas to get closer to a BSD-style use. One of such distributions is Gentoo Linux, but also Slackware Linux, which has preserved a very good shape since its first release (1993). The Gentoo “About” page (http://www.gentoo.org) says that, “Gentoo is a free operating system based on either Linux or FreeBSD…” Therefore, if you use Slackware or Gentoo, these Linuces will always reboot faster than any other Linux.

18) If you compile programs from ports, you will not stumble into compilation errors. BSD packagers prepare their packages carefully, so that users will always compile them successfully. This does not always happen with Linux.

Conclusion

I am the author of One Floppy CD Audio and MP3 Player: freshmeat.net/projects/1fcdbsd and I really like all BSD systems. Some advertisements follow the same pattern as viruses and advertised products are not always good. If you are interested, FreeBSD has the best documentation from all BSD systems, so reading it will only help.

Copyright (c) Juraj Sipos

Using the Root User for Linux System Administration – Linux Training Online – Linux Concepts & Terms

There are often several Linux OS (operating system) terms that are similar, the same, or somehow related.

This article will clear up the confusion about the terms: root user, / (root directory) and /root (the home directory of the root user)!

First, you will learn about the root user, and then see a brief description of the / (root) directory and the /root (home directory) of the root user.

Linux Tips: The articles with names ending in “Linux Concepts & Terms” help you learn Linux “geek-speak” (terms). By learning Linux terms (the Linux “lingo”) you will be able to understand Linux concepts and more easily learn how to use Linux. This is an excellent way to start your Linux training.

The root User

To do Linux system administration tasks, like create Linux users and assign permissions to users, you work as the Linux user named root.

The root user has all permissions (rights, capabilities) to all of the Linux system, including all directories and files.

Linux users that are used for day-to-day tasks, like word processing and working on a spreadsheet, are referred to as “regular” or non-root users. When you’re not doing Linux system administration tasks, always work as a non-root user.

When doing Linux system administration, work as the root user and be extremely careful running Linux commands – because you could damage or destroy your Linux installation – and then immediately log out!

The root user is also referred to as superuser (no, really, and you don’t even get a cape!) and also referred to as su.

When you boot Linux to a console or terminal (and not a Linux desktop), you see a text (not GUI) Login: prompt and you can log in as root to do Linux administration tasks.

However, when you boot a Linux system that has a desktop, you log in at a GUI login prompt and then the Linux desktop appears.

For various security reasons, never log in to a Linux desktop as the root user. Log in to the Linux desktop as a “regular” (non-root) user and then open a Linux terminal (terminal emulation window) on the desktop and use the su command with the – (dash) option to log in and work as the root user.

Linux Tips: The Linux su command gets its name from the word superuser. The su command is run in a Linux terminal emulation window to log in and work as the root user, after logging in to a Linux desktop as a “regular” (non-root) user. Never log in to a Linux desktop as the root user.

Linux Tips: By default, the root user is locked (disabled, unusable) in Ubuntu Linux and you run the Linux sudo command along with Linux system administration commands rather than logging in as root – or using the su command to log in as root.

Now, imagine how easy it will be to learn how to use Linux by seeing all these Linux terms and concepts being clearly presented in a Linux video tutorial!

Related Linux Terms Below are the terms that are similar to, and related to, the root user.

Similar Linux Terms: root user, / (root) directory in the Linux file system and /root (the home directory of the root user)

The / (root) Directory The root directory of the Linux filesystem is represented (symbolized) by a / (forward slash). All directories in the Linux file system are “below”, or “off of” the / (root) directory.

The /root Directory – The Home directory of the root User The directory named root, located directly “below” or “off of” the / (root) directory, is the “home” directory of the root user.

Linux Training – Linux Installation Help – Linux Live CDs & Linux Installation CDs – Pros and Cons

You get real, practical Linux training when you get Linux running on a computer system, and you work with it to get experience.

Once you get the Linux OS (operating system) running, you can learn how to use Linux desktops, run Linux software programs, and most importantly, go to the Linux command line to run Linux commands – the real power behind Linux system administration.

Two popular methods of getting to work with the Linux OS are:

1. Install Linux from CD or DVD onto the hard disk in a system

2. Boot and run Linux from Linux live CDs or DVDs (without installing Linux)

Here are some of the pros and cons of installing Linux on a system and running Linux from a live CD or DVD.

Linux Live CDs – Pros

1. The Linux OS boots and runs in just a few minutes entirely from a single Linux live CD (or DVD).

2. A lengthy Linux installation is not required. You don’t need to provide a lot of settings to the Linux installation routine and then wait while the Linux OS and Linux software programs are copied onto the hard disk.

Also, if you install Linux on Windows, you need to back up your system before you do and you may damage your Windows setup during the Linux installation – or if you remove Linux later!

3. You only need to get 1 Linux live CD or DVD, as opposed to possibly needing several when you install Linux. Therefore, if you download Linux to burn a Linux ISO file to CD / DVD, you only need to wait while 1 Linux CD / DVD is downloaded.

4. Linux live CDs / DVDs are very inexpensive. If you don’t want to download Linux as a live CD / DVD, you can order one and have it mailed to any location on the planet for a very small amount of money. Just run your browser and do a search for “list of linux cds” or “list of linux dvds”.

Linux Tips: If you are going to buy a Linux live version and you have a DVD drive, get a Linux live DVD rather than a CD. A DVD holds about six times as much as a CD. Therefore, you’ll get lots (and lots) more Linux software programs on a DVD!

5. A Linux live CD can easily be removed and taken anywhere. Portable Linux!

6. You can save your work (data files) – if you get the right Linux live CD or DVD.

Linux Tips: Before getting a Linux live CD / DVD, do some research to make sure you can save your work. Some Linux live distros let you save your data and some don’t. For example, the Ubuntu Linux live CD allows you to save your work to a USB flash drive.

Linux Live CDs – Cons

1. Although booting from a Linux live CD / DVD is faster than doing a complete Linux installation, you still need to wait while your system boots from the live CD / DVD, every time your system starts. If you usually keep your system turned on, this isn’t an issue.

2. You may not be able to save your work. Some Linux live CD / DVD distros allow you to save your work and some don’t.

3. You need to boot from the Linux live CD / DVD every time your system starts. This may not be very convenient if you need to put other CDs or DVDs in the drive while running Linux “live”. Any time you need to put something in your drive, you have to remove the live CD / DVD. This also increases the likelihood that your live CD or DVD will become damaged.

Linux Tips: Keep a copy of your current Linux live CD handy in case your working copy becomes damaged.

Either way, installing Linux or using Linux live CDs (or Linux live DVDs), is an excellent way to get Linux training so you can learn how to use Linux.

Page 1 of 1212345...10...Last »