Linux For Dummies book cover

Linux For Dummies

Overview

Your step-by-step guide to the latest in Linux

Nine previous editions of this popular benchmark guide can’t be wrong! Whether you’re new to Linux and need a step-by-step guide or are a pro who wants to catch up with recent distributions, Linux For Dummies, 10th Edition has your back. Covering everything from installation to automation, this updated edition focuses on openSUSE and Ubuntu and includes new and refreshed material—as well as chapters on building a web server and creating simple shell scripts.

In his friendly, no-jargon style, IT professional and tech higher education instructor Richard Blum draws on more than 10 years of teaching to show you just why Linux's open source operating systems are relied on to run a huge proportion of the world’s online infrastructure, servers, supercomputers, and NAS devices—and how you can master them too.

  • Study the thinking behind Linux
  • Choose the right installation approach
  • Pick up the basics—from prepping to desktops
  • Get fancy with music, video, movies, and games

Whatever your Linux needs—work, fun, or just a hobby—this bestselling, evergreen guide will get you up and coding in the open source revolution in no time at all.

Your step-by-step guide to the latest in Linux

Nine previous editions of this popular benchmark guide can’t be wrong! Whether you’re new to Linux and need a step-by-step guide or are a pro who wants to catch up with recent distributions, Linux For Dummies, 10th Edition has your back. Covering everything from installation to automation, this updated edition focuses on openSUSE and Ubuntu and includes new and refreshed material—as well as chapters on building a web server and creating simple shell scripts.

In his friendly, no-jargon style, IT professional and tech higher education instructor Richard Blum

draws on more than 10 years of teaching to show you just why Linux's open source operating systems are relied on to run a huge proportion of the world’s online infrastructure, servers, supercomputers, and NAS devices—and how you can master them too.

  • Study the thinking behind Linux
  • Choose the right installation approach
  • Pick up the basics—from prepping to desktops
  • Get fancy with music, video, movies, and games

Whatever your Linux needs—work, fun, or just a hobby—this bestselling, evergreen guide will get you up and coding in the open source revolution in no time at all.

Linux For Dummies Cheat Sheet

Linux can seem like a very daunting environment. But it doesn’t have to be! With the two topics in this cheat sheet—the commands you’ll use on a daily basis and the useful help pages—you can easily navigate your Linux environment. [caption id="attachment_273250" align="alignnone" width="556"] © MIND AND I /Shutterstock.com[/caption]

Articles From The Book

5 results

Linux Articles

The Linux GNOME Desktop

Simplicity has become the hallmark of the GNOME 3 desktop environment for Linux. There aren't any long menus from which you need to select things from, nor do you need to go digging through folders looking for files, but getting comfortable with the new interface may take some time. This discussion walks through the basic features of the GNOME 3 desktop so you can maneuver your way around.

Menus, please!

At the top of the GNOME 3 desktop is a panel (called the top bar) that when the desktop first opens, contains just three menu selections, as shown. The three menu items are
  • Activities
  • Calendar and notifications
  • System menu
The following sections walk through what each of these menus contains.

The GNOME Activities menu

The Activities menu is how you get to your applications, and check the status of any running applications. You can open the Activities menu using three different methods:
  • Click the Activities menu item in the top bar.
  • Move your mouse pointer to the top-left corner of the desktop (some Linux distributions, such as Ubuntu, have this feature disabled).
  • Press the Super key on your keyboard (the Windows logo on PCs).
When you open the Activities menu, you see the activities overview layout, as shown. The activities overview provides one-stop shopping for getting to all your applications, and viewing the status of any applications already running on the desktop. It consists of three main items:
  • The dash
  • The windows overview
  • The workspace selector

The Calendar menu

The Calendar menu item produces what you'd expect — a calendar, as shown. But wait, there's more! To the left of the calendar is the notification area. The notification area displays any upcoming calendar events that you have scheduled. GNOME 3 allows you to sync your calendar with an online calendar from many popular applications, such as Google, Facebook, and Microsoft, providing a great way to see all your calendar events in one place! Besides keeping up with your appointments, the notification area also displays any messages produced by the system, such as when there are upgrades and patches available to install, or whether your system is running low on disk space. The Do Not Disturb slider allows you to disable system messages from popping up on your desktop.

The system menu

At the far right-hand end of the top bar is the system menu. The system menu displays icons showing the status of several features on your system, depending on what hardware is available on your system. This menu is highly customizable, and often differs slightly between different Linux distributions. The system menu options could include:
  • A network connection status
  • A sound card status
  • A display brightness setting
  • A battery status
  • The status of the logged-in user
  • The reboot options
To get to these menu options, click the down arrow icon in the system menu. A drop-down menu of system options appears, as shown. If your PC has a sound card, you can adjust the volume or mute the speakers, and if your PC has a display that's dimmable there's also a setting to adjust the display brightness. Next you see a menu that allows you to manage your network connection, if available. If your PC uses a wireless network connection, a drop-down menu allows you to select the wireless network to connect with, along with other network settings. If your PC uses a wired network connection, you see options to disable the network connection, and change the network settings. As part of the system menu, most Linux distributions include an option to get to the system settings — usually as either a menu option, or as an icon at the bottom of the system menu. When you select either option the System Settings dialog box appears. It allows you to customize your desktop experience to your liking. Also in the system menu is an option to manage the currently logged in user account. Some Linux distributions customize this option, so your result may vary from what's shown in Figure 4-4. In Ubuntu, you can only lock the desktop for the current user. Fedora Linux allows you to also log out from this menu, or go to the Settings dialog box for the user account. At the bottom of the system menu is the option to power off or log out of the system. The power off menu option provides another menu, allowing you to choose to either restart, shut down, or suspend the system.

Application menu

While I mentioned that only three menus are visible in the top bar by default, a fourth menu appears at times. When you launch an application in the GNOME 3 desktop, a separate menu appears in the top bar. This is the application menu, which contains options related to the application. Instead of placing the application menu in the application's window title bar, GNOME 3 placed it in the top bar, separate from the application window. This can take some getting used to. The options available in the application menu differ depending on the application that you have open on the desktop. Most applications provide options to allow you to open a new window of the application, or quit the existing window. Some applications also provide other application-specific features as well.

The desktop

In many graphical desktop environments, the desktop is king. Often just about everything you do happens from an icon on the desktop. Have a favorite application? Create an icon on the desktop to launch it. Have a file that you need to open on a daily basis? Create an icon on the desktop to open it. Plug in a new USB stick? The system creates an icon automatically on the desktop to access it. The GNOME 3 paradigm has changed that a bit. Desktop icons are no longer the preferred way to launch applications, store files, or access removable media. In fact, many Linux distributions don't even bother creating any icons on the desktop at all by default! However, if you have trouble breaking old habits, GNOME 3 does still allow you to create and use icons on the desktop. The Ubuntu Linux distribution does create two desktop icons by default:
  • The Home folder: Opens the Files file manager program and defaults to the user account Home folder.
  • The Trash folder: Opens the Files file manager program and defaults to the Trash folder for the user account.
You can do a few things from the desktop. Right-click an empty area on the desktop and a pop-up menu opens, as shown. The desktop pop-up menu provides you with a few different choices:
  • New Folder: Create a new folder under your user account's Desktop folder.
  • Paste: Paste any copied files or folders to the desktop.
  • Show Desktop in Files: Open the Desktop folder using the Files file manager program.
  • Open in Terminal: Open the Desktop folder using the Terminal command line interface.
  • Change Background: Modify the picture used for the desktop background.
  • Display Settings: Change the orientation and resolution settings for the display.
  • Settings: Access the Systems setting tool.
This gives you quick access to a few of the system settings related to the desktop.

Many graphical desktops allow you to create new files by right-clicking the desktop, unfortunately GNOME 3 isn't one of them. If you want to create an icon for a file on your desktop, you need to store the file in the Desktop folder, located in your Home folder, using the Files file manager program.

Linux Articles

How to Install Linux from Ubuntu Live

The Ubuntu installation process is one of the simplest in the Linux world. Ubuntu guides you through all the steps required to set up the system, then installs the entire Ubuntu system without prompting you for too much information. You can start the installation process from two locations after you boot from the Live DVD or USB stick:

  • Directly from the boot menu without starting Ubuntu
  • From the Install desktop icon after you start the Ubuntu Live system
Both locations start the same installation process, which guides you through several steps of options.

To begin the installation from the DVD or USB stick you may first need to change your system to start, or boot, from a DVD or USB stick — many systems today are configured to do this already, so you may not need to make any changes. You need to look at your BIOS settings to determine whether your system can boot from the DVD drive or USB stick.

After you have a Live DVD or USB stick in your hand, you can start the installation process. Just follow these steps. 1. Place the Ubuntu Live DVD in the DVD tray of your PC (or plug the USB stick into a USB port), and restart your PC.

Your PC then boots from the Ubuntu Live DVD or USB stick, and you see the main Ubuntu Live menu, shown.

2. From the menu, select your language, and then choose either to install Ubuntu directly, or to try out Ubuntu first by running it from the DVD or USB stick.

The great feature about the Live versions is that you can test drive Ubuntu without having to mess with your hard drive. This gives you an idea of what'll work and what won't. After you've completed your test drive, if you decide to install Ubuntu, just click the Install icon on the desktop, shown. If you decide to run the install from the main menu, skip to Step 4.

3. Select the language to use for the installation, then click Continue.

If you install Ubuntu from the desktop installation icon it asks you again for the default language, shown.

Ubuntu uses this language to display text messages during the installation process, plus sets the default language used when the operating system runs. However, this doesn't necessarily mean that all the applications running on the system will use that language. Each individual application may or may not detect the default language configured in Ubuntu.

4. Select a Keyboard, and then click Continue.

Next up in the installation process is to identify the keyboard you'll use with the Ubuntu system. While this may sound like a simple option, it can get complicated if you have a keyboard that includes special keys. Ubuntu recognizes hundreds of different keyboard types, and lists them all in the Keyboard Layout window, shown.

The Keyboard Layout window lists the different types of keyboards commonly used based on your country. The left-side listing lists countries, and the right-side listing lists the different known keyboard types used in the country selected. Select your country from the left-side listing first, then select your keyboard type from the right-side listing.

For most standard keyboards, the Ubuntu installation script automatically detects the correct keyboard and you won't have to do anything. There's also a button to force the installer to attempt to detect your keyboard again if something went wrong the first time. If you have a special keyboard, under the two listings is an area where you can test the keyboard selection. Just type any special or unique characters available on your keyboard to see whether the setting you selected produces the proper characters.

5. Select what software you'd like installed by default in your Ubuntu desktop, and then click Continue.

The Ubuntu installer gives you some choices on just what software to install, as shown.

The Ubuntu installer gives you two options for the software packages to install:

  • Normal Installation: Includes software for web browsing, office automation (such as word processing and working with spreadsheets), games, and playing audio and video
  • Minimal Installation: Provides a minimal desktop software bundle, which includes only software for web browsing and standard desktop utilities to control your desktop environment

For most Ubuntu desktop installations, select the Normal Installation. If you're using an older workstation with a small hard drive you may have to go with the minimal desktop installation and then manually install any other software packages you need.

If your PC is connected to a network the installer gives you the option to install any available updates from the Ubuntu software repository now if you prefer. Selecting this option increases the installation time, but it also ensures your Ubuntu desktop software is up to date when you first log in.

The last option is to install third-party software. This topic is a bit controversial in the Linux world. Some hardware companies use proprietary drivers so Linux can interact with their hardware. These drivers aren't open source, so many Linux purists prefer not to use them. There are also certain audio and video formats that are proprietary as well, and as you can suspect, these also cause consternation among Linux purists. I'll leave the decision as to whether to select this option to you, but just beware if you choose to not install this bundle your desktop may not work with some of your hardware devices, or be able to play some of the more popular audio and video formats.

6. Select how to install Ubuntu on your hard drive, then click Install Now.

This step in the installation is quite possibly the most important, and also the most complicated. Here's where you need to tell the Ubuntu installer exactly where to place the Ubuntu operating system on your system. One bad move here can really ruin your day.

The options you get in this window during the installation depend on your hard drive configuration, and if you have any existing software on your hard drive. The figure shows an example of what the Installation type window looks like.

The Ubuntu installer tries to detect your exact system setup and provides some simple options:

  • If your entire hard drive is currently used for Windows, the Ubuntu installer offers to shrink the partition to make room for an Ubuntu partition, and create a dual-boot environment.
  • If you've already shrunk your existing Windows partition manually, the Ubuntu installer offers to install Ubuntu on the available empty partition and create a dual-boot environment.
  • If you have a previous version of Ubuntu already installed, the Ubuntu installer offers to upgrade only the OS and leave your data intact if possible.
  • If you have a second hard drive in your workstation the Ubuntu installer offers to use it for Ubuntu, leaving your existing hard drive alone, and create a dual-boot environment.
  • If you have a single hard drive that already contains an existing Windows or Linux partition, the Ubuntu installer offers to erase the entire partition and just install Ubuntu.
  • Allows you to manually partition your hard drive to create your own partitions.

Which option you select depends on just what type of setup you want to try. If you want to run an Ubuntu-only workstation, the option to erase the existing operating system is the quickest and easiest way to go.

Even if you select one of the options to keep the existing operating system, it's a very good idea to back up any important files contained in that operating system. Mistakes can (and often do) happen when working with hard drives.

If you select an option to keep an existing operating system on your hard drive, the Ubuntu installer allows you to select how much disk space to allocate for the new Ubuntu partition. You can drag the partition separator to redistribute disk space between the original operating system and the new Ubuntu partition.

If you select the manual partition process, Ubuntu turns control of the partition process over to you. It does provide a great partition utility, shown, for you to use to create, edit, or delete hard drive partitions.

The manual partition utility displays the current hard drives, along with any existing partitions configured in them. Once you become an experienced Linux user you can manually remove, modify, or create individual partitions on any hard drives installed on the system to customize your Linux setup.

7. If you're performing a manual partition, select a filesystem for your Ubuntu partition.

Part of the manual partition process is to assign a file system to each partition. A filesystem is a method used for storing and accessing files on the partition. Unlike some other operating systems, Ubuntu supports several different filesystems. You can select any of the available file systems for any of the partitions Ubuntu will use. The table shows the filesystem types available for you when creating disk partitions in Ubuntu.

The most common partition type (and the default used by the Ubuntu guided methods) is the ext4 format. This filesystem format provides a journaling filesystem for Ubuntu. A journaling filesystem logs any file changes into a log file before attempting to commit them to the disk. If the system should crash before it can properly commit the data, the journal log file is used to complete the pending file commits, and return the disk to a normal state. Journaling filesystems greatly reduce file corruption in Linux.

8. If you're performing a manual partition, select the mount points for the partitions.

After selecting a filesystem for the partition, the next item that Ubuntu wants for the partition is where to mount the partition in the virtual filesystem. The Ubuntu virtual filesystem handles hard drives by plugging them into specific locations in the virtual filesystem. The table lists the possible locations where you can mount a partition.

If you create just one partition for Ubuntu, you must mount it at the root mount point (/). If you have additional partitions available, you can mount them in other locations within the virtual filesystem.

If you're using the manual partition method, don't forget to allocate a partition for the swap area, even if you already have lots of physical memory installed on your system. The Linux kernel uses the swap area as a temporary holding ground to move sleeping applications out of physical memory to make more room for running applications. The standard rule for this is to create as large of a swap area as you have physical memory. Thus, if you have 8GB of physical memory, create an 8GB partition and assign it as the swap area.

9. If you’re erasing an existing partition, or creating a new one, select any advanced disk features to use, and then click OK.

Ubuntu provides the option for you to use the Logical Volume Manager (LVM) feature in Linux with your hard drive partitions. LVM provides a way for you to easily add more space to an existing directory at any time if needed, even if there's data already in the directory. You may also choose to encrypt the logical volume if you need to. The other option is to use the ZFS filesystem, which is a commercial filesystem recently released to the open source world.

10. Click Install Now to accept the proposed hard drive partition changes and continue with the installation.

Up until this point you can change your mind about the hard drive changes. However, after you click Install Now here you're committed to those changes and there's no going back!

11. Select your location, and then click Continue.

Because Ubuntu is in use worldwide, you'll need to manually select just where in the world you are located so Ubuntu can assign the correct time zone and locale settings.

12. Create a Login ID, and then click Continue.

Up next in the installation process is the Login ID window, shown.

The login ID you create in this process is somewhat important. Unlike other Linux distributions, the Ubuntu distribution doesn't use an administrator login account (usually called root in the Unix/Linux world). Instead, Ubuntu provides the ability for normal user accounts to belong to an administrators group. Members in the administrators group have the ability to become temporary administrators on the system.

Having an account with administrative privileges is important, as the administrator is the only account that's allowed to perform most system functions, such as changing system features, adding new devices, and installing new software. Without an administrative account, you won't be able to do much of anything new on the system.

Besides identifying yourself, you'll also need to assign a name to the computer itself. Ubuntu uses this name when advertising its presence on the network, as well as when referencing the system in log files. You should select a computer name that's unique on your network, is less than 63 characters long, and not contain any special characters (although hyphens are allowed).

One final setting — you must determine whether you want the system to automatically log you into your desktop, or to prompt for your login password. I wouldn't recommend using this feature on laptops that you may accidentally leave behind somewhere. If you'll be the only one using the desktop PC (and there aren't any nosy people around) you can utilize the automatic login feature to save some time. Otherwise, set it to prompt you for a password each time you log into your system.

13. Sit back and enjoy the show!

As the installation process proceeds the installer presents a series of informational slides. Scan over these slides to learn about the features available in your new Ubuntu system.

After the Ubuntu system is installed on the hard drive, the installation program prompts you to reboot. The next time your system boots, you'll be in Ubuntu-land!

Linux Articles

How to Partition a Drive for Linux and Microsoft Windows

If you only have a single hard drive available in your PC, you need to create separate areas (called partitions) on the hard drive for Windows and Linux. This article walks through the process of how to do that, but first, you need to understand how partitions work. Three types of partitions are available: primary, extended, and logical. A hard drive can have three primary partitions and one extended partition. Each primary partition acts as a separate hard drive as far as the operating system is concerned. Inside the extended partition you can have up to 12 logical partitions — think of an extended partition as just a cardboard box that contains the logical partitions. Logical partitions behave similar to primary partitions and hold data; extended partitions just hold logical partitions. Because I can't predict what software you want to install, I recommend having at least 10GB of space available in a partition for your Linux installation. More is always better because it gives you more room for downloads and even more programs.

Make a note of the partition you dedicate to Windows and the one you dedicate to Linux. You need this information when installing Linux.

Those who aren't starting from scratch for a dual boot likely need to make changes to their current installation. Proceed to the next section to find out how.

How to partition a hard drive with Windows tools

If you already have Windows installed on the entire hard drive, you'll need to shrink that partition down so there's room for Linux. The first step is to check your existing hard drive for how much free space is available to dedicate for Linux. You can do that using the File Explorer tool in Windows by following these steps:
  1. Open File Explorer by clicking the folder icon in the taskbar, or typing file explorer in the search area in the taskbar and selecting File Explorer from the search results.
  2. When File Explorer opens, click This PC on the left-hand side of the window. This displays the status of the various storage devices you have connected to your PC. This figure shows an example of what you might see in File Explorer.
The example shows a single hard drive connected to the PC (assigned as drive letter C). File Explorer shows the drive is 899GB in size, and has 483GB available for use as a second partition.

It's usually not a good idea to allocate all the free space on your hard drive to Linux; you'll want to leave some extra room in the Windows partition so you can continue doing things while you're running Windows, such as downloading and installing patches or saving new files.

After you determine how much space you want to dedicate to Linux, you're ready to partition the hard drive. The Windows utility you want to use is the Disk Manager program. Follow these steps to use it:
  1. Right-click the Start icon in the taskbar.
  2. From the menu that appears, choose Disk Management. The Disk Management dialog box appears as shown. The dialog box shows all the hard drives installed on the PC, along with the partitions for each one.
  3. Right-click the partition that indicates it is assigned as a Windows partition and assigned a drive letter (usually the C drive). You can click either the partition entry in the text list, or the graphical picture of the partition.

    As shown, many modern PCs create one or more hidden partitions that aren't assigned drive letters in Windows. These partitions don't appear in File Explorer, but are used by the PC to contain recovery data to reinstall Windows in an emergency. Don't mess with those partitions!

  4. Select Shrink Volume from the pop-up menu. The Shrink Volume dialog box appears, as shown.
  5. Enter the amount of space you want to assign to the Linux partition in the text box. Note that the entry is in MB (megabytes) instead of GB (gigabytes). One gigabyte is equal to 1024 megabytes, so just multiply the available GB space value by 1024 to get the MB value to enter here.
  6. Click Shrink.

During the shrink process Windows tries to move any data stored near the end of the partition towards the front to make room for the new partition. However, some system files can't be moved, which may cause a problem and produce an error message. If this happens there are ways to move those files, but it gets much more complicated that what I can cover here. Fortunately, you aren't the first person to need to do this, so there's plenty of help available. One place to consult is the Microsoft Windows forum at answers.microsoft.com and you'll see lots of postings on how to handle this situation.

When the shrink process completes, a new partition appears in the Disk Manager listing. This new partition appears as Unassigned, and not have a drive letter assigned to it by Windows.

If you have lots of space available on your existing Windows partition you'll probably want a lot more than 10GB of space. The 10GB is the minimum recommended for most Linux distributions to fit the operating system. However, if you download lots of multimedia, you’ll quickly eat up whatever was left after you installed your software! Give Linux as much space as you think you can spare from your Windows environment.

How to partition a hard drive with Linux tools

If you're in a situation where you don't currently have Windows installed on the hard drive but would like to partition the hard drive first, you can use Linux tools to do the work for you. The easy solution is to boot your PC using a Live distribution and use the disk management tools available. Plenty of Live distributions include disk management tools by default, but by far the most popular is the KNOPPIX Linux distribution. The KNOPPIX Linux distribution was the first to create a live Linux version, even back before there were DVDs (it was called a LiveCD!). What keeps KNOPPIX at the top of the list of popular Linux distributions is the myriad of utilities it includes by default. It touts itself as a rescue disk — a way to boot your PC if things go horribly wrong with the existing operating system, and be able to troubleshoot and possibly fix issues. Follow these steps to partition your hard drive using KNOPPIX:
  1. Download the latest KNOPPIX CD or DVD ISO image from the KNOPPIX website.
  2. Burn the ISO image onto a bootable CD, DVD, or USB stick using a standard ISO image burning tool.
  3. Boot your PC using the KNOPPIX LiveDVD. At the boot: prompt, press the Enter key to start KNOPPIX.
  4. Select Graphical Programs→startlxde from the main menu. The KNOPPIX graphical desktop environment comes up. It's a fairly bare-bones graphical desktop so it can run on just about any PC, but it gets the job done.
  5. From the KNOPPIX graphical desktop, click the Terminal icon in the taskbar at the bottom of the desktop. A Terminal session starts that provides access to the command prompt.
  6. At the command prompt in Terminal, enter the command: sudo gparted. The GParted application is a popular disk management tool for Linux. It provides an interface similar to the Windows disk management tool, as shown.
  7. Right-click inside the partition you need to shrink.
  8. Select Resize/Move from the pop-up menu. The Resize/Move dialog box opens, as shown.
  9. In the Resize/Move dialog box, either drag the right end of the partition graphical box to resize the partition, or enter a new value in the New Size textbox. The colored portion of the box indicates where the existing data in the partition is stored. You should be able to move the end of the partition down close to that area.
  10. Click the Resize/Move button to initiate the resizing process.
After the hard drive is partitioned you can exit the tool and shutdown KNOPPIX. And that's all there is to it!