Beruflich Dokumente
Kultur Dokumente
10
“YakketyYak”
Get Started with Ubuntu ® 16.10 “Yakkety Yak”
Copyright © 2016 Matthew Vogel
All other trademarks used in this book are the property of their respective holders. Use of any trademark
in this book does not constitute an affiliation with/or an endorsement from the trademark holder. The
use of the Ubuntu trademark does not constitute an affiliation with/or endorsement by Canonical or the
Ubuntu project. Rather than put a trademark symbol after every occurrence of a trademark name, we
use names in an editorial fashion only, and to benefit the trademark holder, with no intention of
infringement of the trademark.
All information in this book is presented on an “as-is” basis. No warranty or guarantee is provided and
the author and/or publisher shall not be held liable for any loss or damage.
Table of Contents
1. Introduction
2. Installing Ubuntu
4. Updating Ubuntu
4.1 Software Updater
4.2 apt-get
5. File Manager
6.1 Appearance
6.1.2 Look Tab
6.1.2.1 Wallpapers
6.1.2.2 Launcher Icon
6.1.2.3 Theme
6.1.3 Behavior Tab
6.1.3.1 Workspaces
6.1.3.2 Desktop Icon
6.2 Brightness & Lock
6.3 Language Support
6.3.1 Regional Formats
6.4 Online Accounts
6.5 Security & Privacy
6.5.1 Security Tab
6.5.2 Files & Applications Tab
6.5.3 Search Tab
6.5.4 Diagnostics Tab
6.6 Text Entry
6.7 Bluetooth
6.8 Color
6.9 Displays
6.10 Keyboard
6.10.1 Typing Tab
6.10.2 Shortcuts Tab
6.11 Mouse & Touchpad
6.12 Network
6.13 Power
6.14 Printers
6.15 Sound
6.15.1 Output Tab
6.15.2 Input Tab
6.15.3 Sound Effects Tab
6.15.3 Applications Tab
6.16 Wacom Tablet
6.17 Backups
6.18 Details
6.18.1 Overview
6.18.2 Default Applications
6.18.3 Removable Media
6.18.4 Legal Notice
6.19 Landscape Service
6.20 Software & Updates
6.20.1 Ubuntu Software Tab
6.20.2 Other Software Tab
6.20.3 Updates Tab
6.20.4 Authentication Tab
6.20.5 Additional Drivers Tab
6.21 Time & Date
6.21.1 Time & Date Tab
6.21.2 Clock Tab
6.22 Universal Access
6.22.1 Seeing Tab
6.22.2 Hearing Tab
6.22.3 Typing Tab
6.22.4 Pointing and Clicking Tab
6.23 User Accounts
6.23.1 Change Password
6.23.2 Login History
6.23.3 Add User Account
6.23.4 Setting an Initial Password
6.23.5 Setting a User Picture
6.23.6 Renaming a User
6.23.7 Changing an Account Type
6.23.8 Deleting a User
7. Network Configuration
8. Installing Software
9. E-Mail
10. Backups
10.1 Overview
10.2 Folders to Save
10.3 Folders to Ignore
10.4 Storage Location
10.5 Scheduling
Final Thoughts
This book is a beginner’s guide to installing and using Ubuntu 16.10 “Yakkety Yak”, the newest version
of the popular Linux software. This book is designed for a new Linux or Ubuntu user. Intermediate or
advanced Linux users should not purchase this book.
This book is an update from my previous book covering Ubuntu 16.04 LTS released earlier this year.
This book is not an exhaustive guide to the Linux operating system. I do not want to overload a new user
to Linux with a bunch of advanced topics so my goal is to keep this book relatively simple and geared
toward the new Linux user and tackle more advanced topics in other books.
This book is not professionally edited. I am basically a one man show with a full time job in the
Network Security field, a part time job teaching Network Security at night, a part time photographer, and
part time writer. While I have done my best to find my mistakes, this book will have spelling and
grammar errors, I promise. If you find one let me know and I will make sure to fix the problem in the
next edition.
I am not going to waste a lot of time explaining what Ubuntu is and where it comes from. You can read
all about Ubuntu on their Wikipedia page at http://en.wikipedia.org/wiki/Ubuntu_(operating_system).
I will tell you that Ubuntu is a form of Linux which is a free operating system that is Unix-like. My
guess is that you already know that or you would not be reading this book.
I have been using Linux for about 14 years and using Ubuntu for about 7 years. I really like Ubuntu's
ease of installation and ease of use once installed. Ubuntu also tends to include a lot of leading edge
technology in their releases which means that it runs on a lot of the newer hardware without having to
worry about installing special drivers.
You can download Ubuntu directly from their website at http://www.ubuntu.com. On the main page
click on the download tab and then click on Ubuntu Desktop. You can also download a Server version
and a Cloud version but these versions are outside of the scope of this book so I suggest you stick with
the Desktop version.
You will need to choose your flavor, 32-bit or 64-bit. The version you use depends on the type of
processor in your computer. Most new computers are 64-bit. If you are using an older computer you
may need to use the 32-bit version. If you are unsure about what your computer can use just use the
32-bit version.
There are many ways to use Ubuntu. Some of the options are:
LiveDVD
LiveUSB
Install to the hard drive
Virtualization (VirtualBox or VMWare)
If you are going to use the LiveDVD then you will have to burn the ISO to a DVD, not a CD. The size
of the ISO is too large for a CD. If you are going to use the LiveUSB you will need a USB thumb drive
and a utility to create the LiveUSB. There are several utilities on the Internet for burning an ISO to a
DVD or USB Thumb Drive. Some operating system come with utilities that allow you to burn an ISO
image to a DVD or create a bootable USB from an ISO image.
The LiveDVD or LiveUSB allows you to boot into Ubuntu without installing the operating system to
your hard drive, sort of like try before you buy. You will have the option to install the operating system
from the LiveDVD or LiveUSB once the operating system boots. In order to boot from a LiveDVD or
LiveUSB you need to adjust the boot sequence in the BIOS to allow booting from the DVD or USB.
For most systems you will need to interrupt the boot process by pressing F2 or F12 on your keyboard.
There will be a message that is displayed for a few seconds right at the start of the boot sequence that
will tell you which key to push. Some BIOS also allow you to choose the boot device without editing
the BIOS. Once you are in the BIOS look for a tab or section labeled Boot. This is where you will be
able to change the boot options. Be sure to save your changes before you exit the BIOS.
If you install the operating system to your hard drive you can either use the whole hard drive for Ubuntu
or you can dual boot between Windows and Ubuntu or Ubuntu and another flavor of Linux.
1.6.3 Virtualization
Virtualization is an option that allows you to keep your existing operating system and run Ubuntu in a
Virtual Machine (VM). This is the method that I recommend for beginning Linux users unless you have
an older laptop or PC that you do not use as your primary desktop. I personally run Ubuntu in a VM at
home and at school when I teach. I also have a dedicated Ubuntu laptop.
If you want to use Virtualization I recommend using VirtualBox, Figure 1-x. You can download
VirtualBox for free from from their website https://www.virtualbox.org. If you are going to use Ubuntu
in a Virtual Machine you do not need to burn the ISO to a DVD or USB thumb drive. You only need to
download the ISO and point the VM at the ISO as the boot media and off you go.
Ubuntu 16.10 is a non LTS version. Ubuntu 16.04, the previous version of Ubuntu, was a Long Term
Support (LTS) version. A new version of Ubuntu is released every 6 months with an LTS version
released every 2 years. A non LTS version will be supported with updates and security patches for 9
months and an LTS version will be supported for 5 years. For businesses using Ubuntu the LTS version
on servers and desktops, the longer support removes the need to upgrade every 6 to 9 months.
I upgrade my laptop with each release of Ubuntu regardless of the LTS status but my laptop is not an
important as a server or business desktop.
2. Installing Ubuntu
Now that you have your ISO downloaded and burned to a DVD, USB Thumb Drive, or loaded in a VM,
you are ready to start installing Ubuntu. Once the LiveDVD, LiveUSB, or ISO in a VM boots you will
have the option to Try Ubuntu in Live Mode or Install Ubuntu. If you opt to try the Live Mode you will
not need to follow the installation steps and can skip to Chapter 3. Just remember that the next time
you boot into Live Mode any changes you have made will be lost.
Figure 2-1 shows the initial Ubuntu boot screen. The screen includes a status indicator of 4 dots that
shows you the boot progress.
The first interactive screen you will see is shown in Figure 2-2. If you want to install Ubuntu just click
on the Install Ubuntu button. The other option, Try Ubuntu, will boot into Live Mode which will let
you try Ubuntu without installing the operating system. Just remember that the next time you boot into
Live Mode any changes you have made will be lost.
Figure 2-2. Install - Try Ubuntu or Install Ubuntu
On the third install screen, Figure 2-3, be sure to check the boxes Download updates while installing
and Install third-party software. Checking the first checkbox will speed up the installation of Ubuntu
by downloading updates in the background while the installation is taking place. The second checkbox
will allow Ubuntu to play various media like MP3 files. Click Continue to proceed with the
installation.
Figure 2-3. Install - Preparing to install Ubuntu
Next you will need to choose your installation type, Figure 2-4. The default option is to erase the entire
disk and install Ubuntu. For most Ubuntu installations this will be the best choice.
The second choice will encrypt the Ubuntu installation and require a security key or password to unlock
the system during the system boot. Encryption is a good option for laptops if you want to protect
sensitive data. If someone was to steal your laptop they would not be able to access the system without
the security key or password.
The third option installs Ubuntu using Logical Volume Management (LVM). LVM is a more advanced
way of partitioning a disk that makes working with partitions easier. LVM is an advanced topic that will
not be covered in this book. . There is no danger in choosing this option. If you choose to encrypt the
hard drive the LVM option will automatically be selected.
The fourth option is for those users that want to setup their own partitioning. This is a very advanced
topic that will be covered in more detail in Chapter 14. Manual partitioning is not recommended for for
new Linux users so choose this option at your own risk.
Once you choose your option click Install Now to continue the installation.
If you chose to encrypt the hard drive you will be required to provide a security key twice, Figure 2-6.
This key will be required each time your system boots. The password strength meter on the right hand
side of the window will tell you how strong your password is and if both of your passwords match.
Figure 2-6. Install - Choose a security key
You will be asked to confirm your choice, Figure 2-7. Click Continue to continue the installation. If
you want to make changes you can click Go Back.

Figure 2-7. Install - Write the changes to disks?
On the next screen, Figure 2-8, you will be asked to choose your time zone. You can choose a time zone
by simply clicking a location on the map. Once you select a location, click Continue to continue the
installation.
Figure 2-8. Install - Time Zone
On the next screen, Figure 2-9, you will be asked to choose a keyboard layout. The installation should
have already detected your keyboard version so you will most likely not need to change the default.
Choose your keyboard layout and click Continue.
Choosing to require a password and to encrypt your home folder is the most secure method to use so I
highly recommend these options for any system that you are going to use outside of a lab or testing
environment. You should not use the automatic logon option as it is very insecure. Anyone with access
to your system would be able to logon without a password.
When entering your password, the password strength meter on the right hand side of the window will
tell you how strong your password is and if both of your passwords match.
Click Continue once you have entered all of the required information.
The system installation will now commence with the copying of the files to the hard drive, Figure 2-11.
Figure 2-11. Install - Copying files
You have finished the Ubuntu installation, Figure 2-12. Click Restart Now to restart and boot into your
new Ubuntu system.
Figure 2-12. Installation Complete - Restart Now
Once the reboot is complete you will be presented with the Ubuntu Login screen, Figure 2-13, unless
you have an encrypted hard drive in which case you will have to provide your security key to decrypt
the hard drive first, Figure 2-14. At the login screen, the account you created during the installation
process will be highlighted. Use the password you set during the installation process to login.
Now that your Ubuntu system has been installed or you have booted into the LiveDVD mode we will
explore the Ubuntu Unity Desktop.
Figure 3-1 shows the Ubuntu Unity desktop right after the first boot. Unity is the name of the default
Ubuntu desktop manager.
There are other desktop manager that can be used with Ubuntu. Alternate desktop managers will be
covered in Chapter 13.
When logging into Ubuntu for the first time you will be presented with a Keyboard Shortcuts
window. Clicking the X in the upper left hand corner of the Keyboard Shortcuts window will close
the window. If you want to see the Keyboard Shortcuts again just hold the Super button, also know as
the Window button, for 2-3 seconds. The Super button is normally found at the bottom of the keyboard
on the left hand side to the left of the Alt key.
The Unity desktop features a Launcher on the left hand side of the screen which allows you to launch
some of the most common applications such as the File Manager, Firefox web browser, LibreOffice,
and Settings by just clicking on the icon for the corresponding application.
In the top right hand corner of the screen you will find indicators such as the Network Indicator, which
is the two arrows for wired connections, one pointing up and the other pointing down, and the wireless
symbol for wireless connections, the Language Indicator, the Battery Indicator if you are using a
laptop, the Volume Indicator, the Time, and the System icon.
You can also choose applications from the launcher by holding the Super key, also know as the Window
button, for 2-3 seconds. Numbers will appear on the applications in the launcher, Figure 3-2. Pressing
the Super key and a corresponding number will launch that applicati
The very top icon on the Launcher is the Unity Dash search application which will bring up a search
box that will let you search for any application installed on your Ubuntu system, Figure 3-3.
Figure 3-3. Unity Dash Icon
You can also bring up the search box by pressing, not holding, the Super key. Figure 3-4 shows the
search application.
Figure 3-4. Searching for Applications
Typing Firefox in the search box will bring up the Firefox application which can then be launched by
clicking on the Firefox icon, Figure 3-5. The actual application will be displayed at the top of the screen
under Applications.
When the search bar is being used there will be several icons at the bottom of the desktop, Figure 3-6.
The icons represent different types of files. The first icon starting from the left, Home, is for searching
the current user’s Home folder. The second icon is for Applications. The third icon is for Files and
Folders. The fourth icon is for Video files. The fifth icon is for Music files. The last icon all the way
on the right is for Photos.
When any of the icons are selected, Ubuntu will automatically filter the search results based upon the
type of file selected.
The next icon on the Launcher is the File Manager icon which will bring up the File Manager
application, Figure 3-7.
Figure 3-7. File Manager Icon
The File Manager lists the location of files on the left and the actual files in the selected location on the
right, Figure 3-8. The default location when the File Manager is launched is the current user's home
folder. The File Manager works much like file managers in most other operating systems.
3.5 Firefox
The third icon on the Launcher is the Firefox icon, Figure 3-9, which will launch the Firefox web
browser, Figure 3-10.
Figure 3-9. Firefox web browser
3.6 Libreoffice
The next three icons on the Launcher are used to launch Libreoffice applications.
LibreOffice is a free and open source software suite that includes a word processor, a spreadsheet
program, a program for creating slide presentations, a drawing program, and a database program.
LibreOffice is compatible with many different types of office suites and can import and export various
file formats. Figure 3-10 shows the LibreOffice Writer program.
Software is grouped into categories or can be located by using the search function located at the top of
the Ubuntu Software application window, Figure 3-13.
3.8 Amazon
The next icon in the Launcher is the Amazon icon, Figure 3-14.
Figure 3-14. Amazon Icon
The Amazon icon will open the Ubuntu Web Browser and take you directly to the Amazon.com
website.
The next icon on the Launcher is the System Settings icon. The System Settings is broken down into
3 sections, Personal, Hardware, and System, Figure 3-15.
Figure 3-15. System Settings
3.10 Trash
The last icon on the Launcher at the bottom is the Trash icon, Figure 3-16. Files that are deleted via
the File Manager are sent to the trash where the files can be retrieved later until the Trash is emptied.
Figure 3-16. Trash
When there are items in the Trash, there will be virtual paper in the trash can icon, Figure 3-19.
Clicking on the Trash icon will bring up the Trash in a File Manager window, Figure 3-18.
Figure 3-18. File Manager - Trash
In the Trash File Manager window you will have the option to restore a file or folder to the original
location by selecting the file or folder and clicking the Restore button in the upper right hand corner,
Figure 3-19.
You can also empty the Trash by right clicking on the Trash icon and selecting Empty Trash, Figure
3-23.
In the upper right hand corner of the desktop you will find several system status icons, Figure 3-24. The
icons are the Network icon, the Language Status icon, the Bluetooth Status icon if your system has
Bluetooth, the Battery Status icon if you are using a laptop, the Volume Status icon, the Time icon and
the Systems Settings icon.
When using wireless the network connection the icon will be a wireless icon, Figure 3-26.
The next icon going from left to right is the Language Status icon. The default language is English if
you picked English as your language during the install and will be shown as EN in the icon. Figure 3-28
shows the Language Status drop down menu. Languages will be covered in in more detail in Chapter
6.
The next icon going from left to right, which is the Battery Status icon, may or may not exist on your
system. The Battery Status icon only appears when you load Ubuntu on a laptop. Figure 3-30 shows
the Battery Status drop down menu.
The Battery Status drop down menu allows to show the amount of time left on the battery and the
battery percentage in the menu bar as well as access the Power Settings which will be covered in more
detail in Chapter 6.
The next icon going from left to right is the Volume Status icon, which looks like a small speaker. The
sound level will be indicated by the number of shaded lines in the speaker. Clicking on the speaker icon
will bring up the Volume Status drop down menu, Figure 3-31. In the Volume Status drop down menu
you will be able to adjust the volume settings and microphone levels by moving the sliders left or right
and mute the sound by clicking on Mute. You can also access the Sounds Settings from the drop down
menu. Sound settings will be covered in in more detail Chapter 6.
The last icon going from left to right is the System Settings icon. Clicking on the System Settings icon
will bring up the System Settings drop down menu, Figure 3-33, which contains the following options:
The first option on the System Settings drop down menu is About This Computer.
Selecting About This Computer will bring up the Details window, Figure 3-34. The Details window
shows the device name, amount of installed system memory, the type of processor, the type of graphics
card, OS type, and disk size.
In the bottom right hand corner of the Details window there will be a Install Updates button if updates
are available for your system. Clicking the Install Updates button will launch the Software Updater
which will be covered in Chapter 4.
The next option on the System Settings drop down menu is Ubuntu Help. Selecting Ubuntu Help will
bring up the Ubuntu Desktop Guide, Figure 3-35.
The next option on the System Settings drop down menu is System Settings. Selecting System
Settings will bring up the System Settings window, Figure 3-36. System Settings will be covered in
Chapter 6.
Figure 3-36. System Settings
3.11.7.4 Lock
The next option on the System Settings drop down menu is Lock, Figure 3-37. If there is only one user
account on the system the menu option will be Lock. If there is more than one user account on the
system the menu option will be Lock/Switch Account, Figure 3-38. You can also lock the system by
pressing Ctrl+Alt+L.
Selecting Lock will lock the system and display the lock screen, Figure 3-39. All open programs and
windows will remain in the background. To unlock the screen just enter your password.
To switch accounts, click The current account will be locked and clicking the System Settings in the
upper right hand corner of the locked screen will show the other accounts in the Switch Account menu,
Figure 3-40.
Figure 3-40. Ubuntu Desktop - Switch Account
The next option on the System Settings drop down menu is Guest Session.
Selecting Guest Session will switch to the Guest account. When using the Guest account no password
is required and any changes to the system and any saved data will be lost once you switch back to a
regular user account or reboot the system, Figure 3-41. For security reasons, Guest logons should be
disable.
The next items on the System Settings drop down menu will be the other user accounts on the system.
The current user will have a dot on the left and a check on the right hand side if the user account has an
active desktop, Figure 3-42. More than one user can have an active desktop on the same system. If you
switch between users each user will have an active desktop until you logout that user.
Figure 3-42. Ubuntu Desktop - Other system users
Clicking on a different username will take you to the logon screen for that user. The previous user will
also be listed on the logon screen. Any open windows for the previous user will be preserved in the
background.
The next option on the System Settings drop down menu is Log Out. Selecting Log Out will bring up
the Log Out window. You will be given the option to Log Out, Figure 3-43, or Lock the screen, Figure
3-44. Selecting Log Out will log out the current user shutting all open windows and closing all open
programs.
Figure 3-43. Logout
3.11.7.8 Suspend
The next option on the System Settings drop down menu is Suspend. Selecting Suspend will put the
system to sleep preserving the current state of open windows and programs. If you are using Ubuntu on
a laptop, closing the laptop will also cause the system to enter Suspend mode by default.
The last option on the System Settings drop down menu is Shut Down. Selecting Shut Down will
bring up the Shut Down window. You will be given the option to Restart, Figure 3-45, or Shut Down
the system, Figure 3-46.
Figure 3-45. Ubuntu Desktop - Shut Down
Now that you have your Ubuntu system installed and you had a little tour of the desktop it is time to get
serious. You need to update your system with the latest patches and software updates. Ubuntu comes
with a very easy to use software update system that will update all installed software provided it was
installed with the Ubuntu Software Center or via apt-get, which is a command line tool to update your
Ubuntu system.
To update an Ubuntu system you can use the Software Updater. To access the Software Updater click
on the top icon in the Launcher to bring up the Dash search function and type update, Figure 4-1. The
Software Updater will be one of the applications that is listed. To launch the Software Updater just
click on the icon.
Updating software is a multi part process. First the Software Updater has to update the software
sources, Figure 4-2. The software sources contain a list of all the current available software, the latest
versions numbers, and where it is located on the Internet. Once the Software Updater has updated the
software sources, it compares the currently installed versions of software against the current version list
and recommends upgrading any installed software package that has a newer version.
Figure 4-2. Checking for updates
The Software Updater will tell you if new updates are available, Figure 4-3.
If you click the Settings button you will be taken to the Software & Updates settings window, Figure
4-4. Software & Updates settings will be covered in more detail in Chapter 6. To install the updates
click Install Now.
Figure 4-4. Software Updater - Updates Settings
If you choose to install the updates you will have to provide your password for authentication. During
the Ubuntu installation, the user account you created was given special privileges that allow your user
account to use root level privileges (administrator in Linux speak) by supplying your password. Figure
4-5 shows the Software Updater authentication.
Once you authenticate, the update will start. Depending upon the number of updates required, this could
take a little while to complete. Make sure not to turn off your system during the update process as it can
cause problems with your system. Some updates may require a system restart to take effect. If this is
the case, a dialog box at the end of the updates will ask you if you want to restart now or later, Figure
4-6.
Figure 4-6. Software Updater Restart
You should update your Ubuntu system frequently. I update my system every time I use it which is
daily.
4.2 apt-get
Ubuntu can also be updated from the command line using the apt-get command which is used to update
and install software. The apt-get command is my prefered method for updating my system and
installing software.
The apt-get command with the update option will refresh all of the sources and look for any new
software for your system. Figure 4-7 shows the use of the apt-get update command. Notice in Figure
4-7 that the sudo command is used and a password is required. As with the Software Updater, when
using the apt-get command you have to provide authentication to update your system. When you are
working in the Linux command line the sudo command will give you the permissions needed to run
administrative commands like apt-get. The sudo command is covered in Chapter 11.
Once the software sources have been updated, you can use the apt-get command with the upgrade
option to install any updates. The apt-get upgrade command will only update software installed via the
package management system, either the GUI version or apt-get from the command line.
Figure 4-8 shows the use of the apt-get command with the upgrade option. Before software is updated
you may have to press y to agree to continue.
Figure 4-8. apt-get upgrade
The apt-get command with thes dist-upgrade option will update software dependencies along with new
versions of packages. Sometimes the apt-get upgrade command will not be able to update all software,
however the dist-upgrade option can.
Figure 4-9 shows the use of the apt-get command with the dist-upgrade option. Before software is
updated you will may have to press y to agree to continue.
Figure 4-9. apt-get dist-upgrade
5. File Manager
In most operating systems with a graphical user interface (GUI), there is a file manager that can be used
to access files and directories, Linux is no different.
● Note: In Linux, directories are also known as folders. The words directory and folder will be
used synonymously in this book.
Figure 5-1 shows the Ubuntu File Manager called Files. The File Manager is used to access files and
directories on your Linux system.
The File Manager window shows the location of files on the left hand side of the window and the actual
files in the selected location on the right hand side of the window.. The default location when the File
Manager is launched is the current user's home directory. The File Manager works much like file
managers in most other operating systems.
The File Manager in this version of Ubuntu has been changed significantly from previous versions of
Ubuntu. This chapter covers the new version of Files found in Ubuntu 16.10. If you are using an older
version of Ubuntu then your File Manager will be different.
To switch between Grid and List view, click on the Grid or List icon, the middle icon, in the top right
hand corner of the window. Clicking on the icon will show a drop down menu, Figure 5-3.
Figure 5-3. File Manager - Grid View and List View drop down menu
As you switch between Grid and List views the middle icon will change. Figure 5-4 shows the Grid
View icon and Figure 5-5 shows the List View icon.
The Grid View menu, Figure 5-6, allows you to sort files and folders by Name, Size, Type, and Last
Modified. You can also Reverse the Order that the files and folders appear, Show Hidden Files, and
Reload the File Manager window.
Figure 5-6. File Manager - Grid View menu
Hidden files are files that start with a . character. Selecting Show Hidden Files will show all files in a
directory, Figure 5-7.
Figure 5-7. File Manager - Show Hidden Files
The List View menu, Figure 5-8, allows you to select the Visible Columns, Show Hidden Files, and
Reload the File Manager window.
Selecting Visible Columns will bring up the Visible Columns window, Figure 5-9, which allows you to
select which columns are displayed in List View.
Figure 5-9. File Manager - List View menu - Visible Columns
5.2 Search
You can use the magnifying glass in the upper right hand corner of the File Manager window to search
for a specific file or folder. Clicking on the magnifying class brings up a search box near the top of the
window, Figure 5-10. Typing Desktop in the search box will find any files or folders with Desktop in
the name. The search location is the location that was selected in the left pane before the search started.
If the Home directory was selected so only the Home directory is searched.
Figure 5-10. File Manager - Search
To search the entire file system you have to select Other Locations in the lower left pane, select
Computer at the top of the middle pane, and then perform the search, Figure 5-11.
Figure 5-11. File Manager - Search Computer
On the far right hand side of the File Manager windows is the File Manager Menu icon, Figure 5-12.
Clicking on the File Manager Menu icon will bring up the File Manager drop down menu, Figure
5-13, that has the following options:
New Folder
New Tab
Undo
Redo
Select All
Enter Location
Bookmark this Location
Figure 5-13. File Manager - Drop down menu
The New Folder option allows you to create a new folder in the current location. You will have to
provide a folder name and click Create, Figure 5-14. When creating a folder name or filename in Linux
you can use spaces and certain special characters in the folder name, however, it is not recommended.
You can also create a new folder by pressing Shift+Ctrl+N when the File Manager window is open and
has focus.
The New Tab option will open a new File Manager tab in the current File Manager window, Figure
5-15. You can also open a new File Manager tab by pressing Ctrl+T when a File Manager window is
already open and has focus. You can switch between tabs by clicking on the tabs at the top of the File
Manager window.
Figure 5-15. File Manager - 2 tabs
You can open multiple tabs, Figure 5-16. Each new tab will open on the right hand side of the File
Manager window and will open in the same location of the last tab on the right. Each tab can be
focused on a different location in the filesystem and files and folders can be easily copied and pasted
between tabs.
Figure 5-16. File Manager - 4 tabs
Tabs can be closed by clicking the X on the right hand side of the tab.
5.3.3 Undo
The Undo option will undo the last action taken. Figure 5-17 shows Undo Trash which means that the
last action taken was to move a file or folder to the Trash. You can also Undo the previous action by
pressing Ctrl+Z when a File Manager window is already open and has focus.
Figure 5-17. File Manager Menu - Undo
5.3.4 Redo
The Redo option will undo the last Undo action taken. Figure 5-18 shows Redo Trash which means
that the last action was to Undo a move to the Trash of a file or folder. Clicking Redo Trash will put
the file or folder back in the Trash. You can also Redo the previous action by pressing Shift+Ctrl+Z
when a File Manager window is already open and has focus.
The Enter Location option opens the location box at the top of the File Manager window, Figure 5-19.
You can also open the location box by pressing Ctrl+L when a File Manager window is already open
and has focus. You can enter any location in the file system and press enter to go to that location.
The Bookmark this Location option allows you to bookmark the current location of the File Manager
so you can easily return to the location at any time. You can also bookmark the current location by
pressing Ctrl+D when a File Manager window is already open and has focus.
When you select Bookmark this Location nothing much will happen on the screen. Your bookmark
will appear on the Sidebar on the left hand side of the File Manager window, Figure 5-20.
Figure 5-20. File Manager - Bookmark
Bookmarks have a menu that you can access by right clicking on the bookmark, Figure 5-21. From this
menu you can Open the bookmark in the current window, Open in a New Tab, Open in New Window,
Remove the bookmark, Rename the bookmark, or access the Properties page for the folder that the
bookmark points to.
Figure 5-21. File Manager - Bookmark Menu
5.4 Navigation
If you click on a directory in the left pane of the File Manager window, the File Manager will display
the selected directory in the right pane of the window and the parent or higher level directories at the top
of the window in small boxes. You can click on any of the directories listed at the top of the window in
the boxes or you can use the back and forward buttons in the upper left hand corner to navigate through
the file structure. Figure 5-22 shows the Documents directory. Since the Documents directory is
located in the Home directory both the Home and Documents directory are displayed at the top of the
File Manager window in the boxes.
Figure 5-22. File Manager - Documents
Right clicking on any empty space in the right pane of the File Manager window will bring up a
floating menu that has the following options, Figure 5-23:
New Folder
Paste
Select All
Properties
Restore Missing Files
Open in Terminal
Figure 5-23. File Manager - Right Click
Since the Documents folder is the current location that has focus in the File Manager in Figure 5-18,
all of the actions in the menu will take effect in the Documents folder.
The New Folder option allows you to create a new folder in the current location. You will have to
provide a folder name and click Create, Figure 5-24. When creating a folder name or filename in Linux
you can use spaces and certain special characters in the folder name, however, it is not recommended. It
is best to stick to letters, numbers, and the character - and _. You can also create a new folder by
pressing Shift+Ctrl+N when the File Manager window is open and has focus.
The Paste option will only be available if you have performed a cut or a copy action first. Selecting
Paste will allow you to paste a cut or copied file or folder to the current directory. You can also perform
a paste operation by pressing Ctrl+V when the File Manager window is open and has focus.
The Select All option will allow you to select all files and folders in the current File Manager window.
Once selected, all of the files and folders will be highlighted. You can then perform an operation on all
of the files and folders at the same time such as Cut, Copy, Move to Trash, Compress, etc. You can
also perform a Select All operation by pressing Ctrl+A when the File Manager window is open and has
focus.
5.5.4 Properties
The Properties option shows the properties for the current directory or folder. The directory properties
dialog box has three tabs, Figure 5-25:
Basic
Permissions
Local Network Share
The Permissions tab, Figure 5-26, shows the various permissions for the current directory.
The permission are broken down into Owner, Group, and Others with each having their own
permissions. File and directory permissions are covered in more detail in Chapter 11.
The first set of permissions belong to the Owner of the directory which in Figure 5-26 is Me which
means the current user and from here cannot be changed. Below the Owner label is the access
permissions for the owner which by default is Create and delete files. You can change the permissions
by clicking the down arrow to the right of the access permissions, Figure 5-27.
Figure 5-27. File Manager - Permissions - Owner Permissions
The access permission options for the Owner are the following:
The second set of permissions belong to the Group. By default the Group is set to the current user’s
primary group when a directory is created. The user’s primary group name is normally the same as the
user’s username but do not get them confused. Even though the user and group have the same name
they are different objects in the system.
You can change the file’s Group assignment by clicking the down arrow to the right of the group name,
Figure 5-28.
Figure 5-28. File Manager - Permissions - Select a Group
You can change the group permissions by clicking the down arrow to the right of the access permissions
for the Group, Figure 5-29.
Figure 5-29. File Manager - Permissions - Group Permissions
The access permission options for the Group are the following:
None
List files only
Access files
Create and delete files
The third set of permissions belong to Others, which is the same as Everyone in other operating
systems, Figure 5-30. You can change the permissions by clicking the down arrow to the right of the
access permissions for Others.
Figure 5-30. File Manager - Permissions - Others Permissions
None
List files only
Access files
Create and delete files
At the bottom of the window is a button, Change Permissions for Enclosed Files, that will allow you
to copy the permissions from the current directory to all of the files and folders in the directory. The
Change Permissions for Enclosed Files window, Figure 5-31, allows you to change the permissions for
both files and folders in the current folder. There are permissions for the Owner, Group, and Others.
Figure 5-31. File Manager - Permissions - Change Permissions for Enclosed Files
The file permission options for the Owner are Read-only and Read and write.
The file permission options for the Group and Others are None, Read-only, and Read and write.
The directory permission options for the Owner are List files only, Access files, and Create and delete
files.
The directory permission options for the Group and Others are None, List files only, Access files, and
Create and delete files.
File and directory permissions will be covered in more detail in Chapter 11.
Ubuntu makes the sharing of directories over the network very easy. The Local Network Share tab,
Figure 5-32, contains all of the configuration options necessary to share a directory or folder.
The first step to sharing a directory is to click the Share This Folder checkbox.
If this is the first time you have shared a folder you will be asked to install the sharing service also
known as Samba, Figure 5-33.
Figure 5-33. File Manager - Properties - Local Network Share - Install sharing service
Click Install to install the Samba software package, Figure 5-34. You will be asked to authenticate with
your password.
Figure 5-29. File Manager - Properties - Local Network Share - Install sharing service - Samba
Once the install is complete, the Share name and Comment fields, which were greyed out, will become
active. You will have to provide the Share name in order to share the folder but the Comment section
can be left blank. If you want users to be able to create and delete files and folders in the share you must
check the Allow others to create and delete files in this folder checkbox. You can also enable Guest
access, however, for security reasons this is not recommended as this means that anyone can access the
share.
With Samba shares enabled other operating systems can connect to the share over the network.
The Restore Missing Files option allows you restore files from a backup to the current location.
Selecting Restore Missing Files will bring up the Restore window, Figure 5-35. Backing up and
restoring files will be covered in Chapter 10.
Figure 5-35. File Manager - Restore
The Open in Terminal option will open the current location in a terminal window, Figure 5-36. The
terminal or command line will be covered in Chapter 11.
Figure 5-36. File Manager - Terminal
Right clicking on any folder or directory in the right pane of the File Manager window will bring up a
floating menu, Figure 5-37.
Figure 5-37. File Manager - Right click directory
Open
Open In New Tab
Open in New Window
Open With Other Application
Cut
Copy
Paste Into Folder
Move to
Copy to
Move to Trash
Rename
Compress
Send to
Revert to Previous Version
Local Network Share
Open in Term
Properties
5.6.1 Open
The Open option will open the folder in the current File Manager window. You can also Open a folder
by highlighting the folder and pressing Ctrl+O.
The Open In New Tab option will open the folder in a new tab in the current File Manager window.
You can also Open In New Tab a folder by highlighting the folder and pressing Shift+Ctrl+T.
The Open In New Window option will open the folder in a new File Manager window.
The Open With Other Application option allows you to open the folder with another program besides
Files. Selecting Open With Other Application will bring up the Select Application window, Figure
5-38. The default application for opening a folder is Files.
To see other applications that can be used to open a folder, click on View All Applications at the bottom
of the window. This list will only include applications that have been installed on the system, Figure
5-39.
Figure 5-39. File Manager - Other Applications
To see which applications may be available to install click on Find New Applications, which will open
the Ubuntu Software window with inode/directory as the search term, Figure 5-40. You can install other
applications from this window. The Ubuntu Software application will be covered in more detail in
Chapter 8.
Figure 5-40. Ubuntu Software
5.6.5 Cut
The Cut option allows you to cut and later paste a folder into a different location. Once a folder or
directory is cut the color will get slightly lighter indicating that the file or directory has been cut and that
a paste action is pending. Once a paste action is completed in another location in the file system, the file
or directory icon will disappear from the original location and appear in the new location. You can also
Cut a folder by highlighting the folder and pressing Ctrl+X
If you attempt to paste a cut directory into a new location that already contains a directory with the same
name, you will receive a Merge folder error, Figure 5-41. You will be given the details on both the
original folder and the replacement folder and given the option to Cancel the action, Skip the action, or
Merge the folders. If you are cutting and pasting multiple folders you can apply the action to all folders
by selecting the Apply this action to all files checkbox.
Figure 5-41. File Manager - Merge folder
If you do not want to merge the folders you can also choose to Select a new name for the destination,
Figure 5-42. You must provide a new name for the folder and click Rename.
5.6.6 Copy
The Copy option allows you to copy and later paste a folder into the same location or a different
location than the original folder. You can also perform a Copy action by pressing Ctrl+C when a folder
is highlighted in a File Manager window.
If you attempt to paste a copied directory into a new location that already contains a directory with the
same name, you will receive a Merge folder error, Figure 5-43. You will be given the details on both
the original folder and the replacement folder and given the option to Cancel the action, Skip the action,
or Merge the folders. If you are copying and pasting multiple folders you can apply the action to all
folders by selecting the Apply this action to all files checkbox.
If you do not want to merge the folders you can also choose to Select a new name for the destination,
Figure 5-44. You must provide a new name for the folder and click Rename.
If you copy and paste a folder into the original location the label (copy) will be appended to the new
folder.
5.6.8 Move to
The Move To option allows you to move a folder to a different location than the original location. The
Move To option is essential a cut and paste operation. When Move To is selected from the menu, the
Select Move Destination window will appear, Figure 5-45, which allows you to select a location for the
Move To operation. Clicking the + in the upper right hand corner will allow you to create a new folder
in the current location.
Just like with a cut and paste operation, moving a file or folder to a location that already contains a file
or folder with the same name will cause a Merge folder error, Figure 5-46. You will be given the
details on both the original folder and the replacement folder and given the option to Cancel the action,
Skip the action, or Merge the folders. If you are copying and pasting multiple folders you can apply the
action to all folders by selecting the Apply this action to all files checkbox. If you do not want to
merge the folders you can also choose to Select a new name for the destination.
Figure 5-46. File Manager - Move To - Merge
5.6.9 Copy to
The Copy To option allows you to copy a folder to a different location than the original folder. The
Copy To option is essential a copy and paste operation. When Copy To is selected from the menu, the
Select Copy Destination window will appear, Figure 5-47, which allows you to select a location for the
Copy To operation. Clicking the + in the upper right hand corner will allow you to create a new folder
in the current location.
Figure 5-47. File Manager - Copy To
Just like with a copy and paste operation, copying a file or folder to a location that already contains a file
or folder with the same name will cause a Merge folder error, Figure 5-48. You will be given the
details on both the original folder and the replacement folder and given the option to Cancel the action,
Skip the action, or Merge the folders. If you are copying and pasting multiple folders you can apply the
action to all folders by selecting the Apply this action to all files checkbox. If you do not want to
merge the folders you can also choose to Select a new name for the destination.
Figure 5-48. File Manager - Copy To - Merge
The Move to Trash option allows you to delete folders and save a copy in the Trash for later retrieval
just in case. You can also move folders to the Trash by highlighting the folder and pressing the Delete
key.
5.6.11 Rename
The Rename option allows you to rename a folder. Once you select Rename the folder name will
become editable, Figure 5-49. To rename the file, type the new filename and click Rename. You can
also rename a folder by highlighting the folder and pressing the F2 key.
Figure 5-49. File Manager - Rename folder
5.6.12 Compress
The Compress option allows you to compress folders in order to save space and bundle files together.
Selecting Compress brings up the Compress window, Figure 5-50. The Compress window allows you
to specify the name of the compressed file that that will be created and the location to store the
compressed file. The default name is the name of the file with the compression extension and the
default location is Documents. You can also choose from the different compression types. The default
compression type is tar.gz.
Figure 5-50. File Manager - Compress
Clicking the down arrow next to the compression types, Figure 5-51, will bring up the list of
compression types.
The Other Options allow you to password protect the compressed file if the compression type supports
password protection, Figure 5-52. Not all compression types support password protection. If the
compressed file is large you can also choose to split the file into smaller pieces.
Once created, you will get a message that allows you to Close or Open the Archive, Figure 5-53.
The compressed archive will appear in the selected location with the file extension of the compression
type you choose, Figure 5-54.
Figure 5-54. File Manager - Compressed file - Archive created
Once the compressed file is created you can right click on the file. The menu looks similar to the menu
for a regular file or folder but includes Open With Archive Manager and Extract Here options, Figure
5-55 and 5-56.
Figure 5-55. File Manager - Compressed file - Right click
Figure 5-56. File Manager - Compressed file - Right click
Compressed files can contain more than one file or folder and the contents can be viewed using Archive
Manager by selecting Open With Archive Manager from the drop down menu opened by right
clicking on a compressed file.
The Archive Manager, Figure 5-57, shows the contents of the compressed file and allows you to extract
the contents by clicking Extract in the top left hand corner of the window. You can also specify a
specific location for the extracted files to be placed. By default the extracted files will be placed in the
same location as the compressed file.
Figure 5-57. File Manager - Compressed file - Extract
Clicking on the menu icon in the upper right hand corner will allow you to save the archive with a
different name, unlock the archive with a password if the archive is password protected, test the integrity
of the file, and see the properties for the archive file, Figure 5-58.
Figure 5-58. File Manager - Compressed file - Extract - Menu
Clicking Extract will bring up the Extract location window, Figure 5-59. From this window you can
choose the location to extract the files to. Click Extract to extract the files from the archive.
Figure 5-59. File Manager - Compressed file - Extract Location
You can add additional files to a compressed file using the Archive Manager by clicking the + in the
upper left hand corner, Figure 5-60.
Figure 5-60. File Manager - Compressed file - Add files
The Add Files window, Figure 5-61, allows you to select files to add to the compressed file. Once
selected click Add in the bottom right hand corner.
Figure 5-61. File Manager - Compressed file - Add files
The Extract Here option extracts the files or an archive to the current location. Once the extraction is
complete a completion message will appear, Figure 5-62.
5.6.16 Send to
Selecting Send to allows you to attach a folder to an email and will bring up the default email program,
which in most cases is Thunderbird. Email is covered in more detail in Chapter 9. If you have not
configured an email client, the email client configuration will be presented when you select Send to
from the drop down menu.
The Revert to Previous Version option allows you to retrieve an older version of a folder from a
backup archive. Selecting Revert to Previous Version brings up the Restore window, Figure 5-64.
The Restore window lets you choose which backup archive to restore the file from. Backups are
covered in more detail in Chapter 10.
Figure 5-64. File Manager - Restore
Ubuntu makes the sharing of directories over the network very easy. The Local Network Share tab,
Figure 5-65, contains all of the configuration options necessary to share a directory or folder.
The first step to sharing a directory is to click the Share This Folder checkbox.
Figure 5-65. File Manager - Properties - Local Network Share
If this is the first time you have shared a folder you will be asked to install the sharing service also
known as Samba, Figure 5-66.
Figure 5-66.. File Manager - Properties - Local Network Share - Install sharing service
Click Install to install the Samba package, Figure 5-67. You will be asked to authenticate with your
password.
Figure 5-67. File Manager - Properties - Local Network Share - Install sharing service - Samba
Once the install is complete, the Share name and Comment fields which were greyed out will become
active. You will have to provide the Share name in order to share the folder but the Comment section
can be left blank. If you want users to be able to create and delete files and folders in the share you must
check the Allow others to create and delete files in this folder checkbox. You can also enable Guest
access, however, for security reasons this is not recommended as this means that anyone can access the
share.
With Samba shares enabled, other operating systems can connect to the share over the network.
The Open in Terminal option will open the current location in the filesystem in a terminal window,
Figure 5-68. The terminal or command line will be covered in Chapter 11.
5.6.20 Properties
The Properties option shows the properties for the current directory or folder. The directory properties
dialog box has three tabs, Figure 5-69:
Basic
Permissions
Local Network Share
The Basic tab, Figure 5-69, shows the name of the directory, the type, the contents, the location of the
directory, and the free space of the drive that the directory is located on. The name of the directory can
also be changed from the Basic tab.
The Permissions tab, Figure 5-70, shows the various permissions for the current directory.
Figure 5-70. File Manager - Permissions
The permission are broken down into Owner, Group, and Others with each one having their own
permissions. File and directory permissions are covered in more detail in Chapter 11.
The first set of permissions belong to the Owner of the directory which in Figure 5-70 is Me which
means the current user and from here cannot be changed. Below the Owner label is the access
permissions for the owner which by default is Create and delete files. You can change the permissions
by clicking the down arrow to the right of the access permissions, Figure 5-71.
Figure 5-71. File Manager - Permissions - Owner Permissions
The access permission options for the Owner are the following:
The second set of permissions belong to the Group. By default the Group is set to the current user’s
primary group when a directory is created. The user’s primary group name is normally the same as the
user’s username but do not get them confused. Even though the user and group have the same name
they are different objects in the system.
You can change the file’s Group assignment by clicking the down arrow to the right of the group name,
Figure 5-72.
Figure 5-72. File Manager - Permissions - Select a Group
You can change the permissions by clicking the down arrow to the right of the access permissions for the
Group, Figure 5-73.
Figure 5-73. File Manager - Permissions - Group Permissions
The access permission options for the Group are the following:
None
List files only
Access files
Create and delete files
The third set of permissions belong to Others, which is the same as Everyone in other operating
systems, Figure 5-74. You can change the permissions by clicking the down arrow to the right of the
access permissions for Others.
Figure 5-74. File Manager - Permissions - Others Permissions
None
List files only
Access files
Create and delete files
At the bottom of the window is a button, Change Permissions for Enclosed Files, that will allow you
to copy the permissions from the directory to all of the files and folders in the directory. The Change
Permissions for Enclosed Files window, Figure 5-75, allows you to change the permissions for both
files and folders in the current folder. There are permissions for the Owner, Group, and Others.
Figure 5-75. File Manager - Permissions - Change Permissions for Enclosed Files
The file permission options for the Owner are Read-only and Read and write.
The file permission options for the Group and Others are None, Read-only, and Read and write.
The directory permission options for the Owner are List files only, Access files, and Create and delete
files.
The directory permission options for the Group and Others are None, List files only, Access files, and
Create and delete files.
File and directory permissions will be covered in more detail in Chapter 11.
Ubuntu makes the sharing of directories over the network very easy. The Local Network Share tab,
Figure 5-76 contains all of the configuration options necessary to share a directory or folder.
The first step to sharing a directory is to click the Share This Folder checkbox.
If this is the first time you have shared a folder you will be asked to install the sharing service also
known as Samba, Figure 5-77, which was already already covered earlier in this chapter.
Figure 5-77. File Manager - Properties - Local Network Share - Install sharing service
You will have to provide the Share name in order to share the folder but the Comment section can be
left blank. If you want users to be able to create and delete files and folders in the share you must check
the Allow others to create and delete files in this folder checkbox. You can also enable Guest access,
however, for security reasons this is not recommended as this means that anyone can access the share.
With Samba shares enabled, other operating systems can connect to the share over the network.
Right clicking on a file brings up a different drop down menu from right clicking on a folder, Figure
5-78.
Figure 5-78. File Manager - Right click on a file
The Open With Text Editor option will open the file with Gedit which is a text editing program that
comes installed in Ubuntu and many other flavors of Linux, Figure 5-79. Gedit can be used to edit
basic text files but not full document file types. You can also perform an Open With Text Editor action
by pressing Ctrl+O when a file is highlighted in a File Manager window that is already open and has
focus.
Figure 5-79. File Manager - Gedit
The Open With Other Application option allows you to open the file with another program such as
LibreOffice which is an office productivity software suite that comes with Ubuntu Linux, Figure 5-80.
Figure 5-80. File Manager - Open WIth
To see other applications that can be used to open a file, click on View All Applications at the bottom of
the window. This list will only include applications that have already been installed on the system,
Figure 5-81.
Figure 5-81. File Manager - Other Applications
To see which applications may be available to install, click on Find New Applications, which will open
the Ubuntu Software window with inode/directory as the search term, Figure 5-82. You can install other
applications from this window. The Ubuntu Software application will be covered in more detail in
Chapter 8.
Figure 5-82. Ubuntu Software
5.7.3 Cut
The Cut option allows you to cut and later paste a file or folder into a different location. You can also
perform a Cut action by pressing Ctrl+X when a file is highlighted in a File Manager window.
Once a file or directory is cut the color will get slightly lighter indicating that the file or directory has
been cut and that a paste action is pending. Once a paste action is completed in another location in the
file system, the file or directory icon will disappear from the original location and appear in the new
location.
If you attempt to paste a cut file or directory into the same location that the original file or directory is
cut from or if the new location already contains a file or directory with the same name, you will receive
a File Conflict error, Figure 5-83. You will be given the details on both the original file and the
replacement file and given the option to Cancel the action, Skip the action, or Replace the file. If you
are cutting and pasting multiple files you can apply the action to all files by selecting the Apply this
action to all files checkbox.
Figure 5-83. File Manager - File conflict
5.7.4 Copy
The Copy option allows you to copy and later paste a file or folder into the same location or a different
location than the original file or folder. You can also perform a Copy action by pressing Ctrl+C when a
file is highlighted in a File Manager window.
If you copy and paste into the same location, then a new file with the (copy) tag included in the name
will be created, Figure 5-84. Unlike using cut and paste in the same location, you will not get a error.
Figure 5-84. File Manager - Copy and Paste into the same location
5.7.5 Move To
The Move To option allows you to move a file or folder to a different location than the original file or
folder location. The Move To option is essential a cut and paste operation. Once Move To is selected
from the menu, the Select Move Destination window will appear, Figure 5-85, which allows you to
select a location for the move operation.
Figure 5-85. File Manager - Select Move To Destination
Clicking the + in the upper right hand corner will allow you to create a new folder in the current
location. Just like with a cut and paste operation, moving a file or folder to a location that already
contains a file or folder with the same name will cause a File Conflict error, Figure 5-86. You will be
given the details on both the original file and the replacement file and given the option to Cancel the
action, Skip the action, or Replace the file. If you are moving multiple files you can apply the action to
all files by selecting the Apply this action to all files checkbox.
Figure 5-86. File Manager - Move To - File conflict
5.7.6 Copy To
The Copy To option allows you to copy a file or folder to a different location than the original file or
folder. The Copy To option is essential a copy and paste operation. Once Copy To is selected from the
menu, the Select Copy Destination window will appear, Figure 5-87, which allows you to select a
location for the move operation.
Figure 5-87. File Manager - Select Copy To Destination
Clicking the + in the upper right hand corner will allow you to create a new folder in the current
location.
The Move to Trash option allows you to delete files and save a copy in the Trash for later retrieval just
in case. You can also move file to the Trash by highlighting the file and pressing the Delete key.
5.7.8 Rename
The Rename option allows you to rename a file. Once you select Rename the file name will become
editable, Figure 5-88. To rename the file, type the new filename and click Rename.
Figure 5-88. File Manager - Rename file
5.7.9 Compress
The Compress option allows you to compress files in order to save space and bundle files together.
Selecting Compress brings up the Compress window, Figure 5-89. The Compress window allows you
to specify the name of the compressed file that that will be created and the location to store the
compressed file. The default name is the name of the file with the compression extension and the
default location is Documents. You can also choose from the different compression types. The default
compression type is tar.gz.
5.7.10 Send to
Selecting Send to allows you to attach a ffil to an email and will bring up the default email program,
which in most cases is Thunderbird. Email is covered in more detail in Chapter 9. If you have not
configured an email client, the email client configuration will be presented when you select Send to
from the drop down menu.
The Revert to Previous Version option allows you to retrieve an older version of a file from a backup
archive. Selecting Revert to Previous Version brings up the Restore window, Figure 5-89. The
Restore window lets you choose which backup archive to restore the file from. Backups are covered in
more detail in Chapter 10.
Figure 5-89. File Manager - Restore
5.7.12 Properties
The Properties option brings up the properties window for the selected file.
The Properties window for a file, Figure 5-90, has the following tabs:
Basic
Permissions
Open With
Figure 5-90. File Manager - Properties - Basic Tab
The Basic tab, Figure 5-90, shows the name of the file, the file type, the file size, the file location, and
the last accessed and modified date and time. The name of the file can also be changed from the Basic
tab.
The Permissions tab, Figure 5-91, shows the various permissions for a file. The permissions are broken
down into Owner, Group, and Others with each one having their own permissions.
The first set of permissions belong to the owner of the file, which is Me meaning the current user.
Below the Owner label is the access permissions for the owner, which by default is Read and write.
Figure 5-91. File Manager - Properties - Permissions Tab
You can change the permissions by clicking the down arrow to the right of the access permissions,
Figure 5-92.
The access permission options for the Owner include the following:
Read-only
Read and write
Figure 5-92. File Manager - Properties - Owner - Access permissions
The second set of permissions belong to the Group. By default the Group is set to the current user’s
primary group when a file is created, Figure 5-93. You can change the group by clicking the down
arrow to the right of the group name.
Figure 5-93 . File Manager - Properties - Group
You can change the permissions by clicking the down arrow to the right of the access permissions for the
Group, Figure 5-94.
The access permission options for the Group are the following:
None
Read-only
Read and write
Figure 5-94. File Manager - Properties - Group - Access Permissions
The third set of permissions belong to the Others, Figure 5-95. You can change the permissions by
clicking the down arrow to the right of the access permissions for the Others.
The access permission options for the Others are the following:
None
Read-only
Read and write
Figure 5-95. File Manager - Properties - Others - Access Permissions
At the bottom of the window, the Allow executing file as a program option, Figure 5-96, allows you to
select which files can be run as a program like a script or other executable program. Be careful when
using this option. Ensure you have the permissions properly set before selecting this option to prevent
users from executing scripts or programs that they are not authorized to execute.
Figure 5-96. File Manager - Properties - Execute
The Open With tab, Figure 5-97, shows the various programs that can used to open the file. The
applications groups include Default Application, Recommend Applications, and Other Applications.
Figure 5-97. File Manager - Properties - Open With
You can change the Default Application by selecting an application in the Recommended
Applications or Other Applications section and clicking the Set as default button in the bottom right
hand corner. The selected application will be moved up to the Default Application and what was the
Default Application will be moved down to the Recommended Applications section.
You can move applications from the Other Applications section to the Recommended Applications
section by selecting an application and clicking the Add button at the bottom of the window. The
selected application will be moved up to the Recommended Applications section.
You can reset all of the settings to default by clicking the Reset button in the lower left hand corner of
the window. The Default Application and Recommended Applications will be reset to the default
configuration.
The File Manager has a menu option in the top left hand corner of the window, similar to most
operating systems, Figure 5-98.
Figure 5-98. File Manager - Files menu
New Window
Sidebar
Preferences
Keyboard Shortcuts
Help
About
Quit
The first option, New Window, will open a new File Manager window. You can also open a new File
Manager window by pressing Ctrl+N when a File Manager window is already open and has focus.
The new File Manager window will open with the Home folder as the focus.
5.8.2 Sidebar
The next option, Sidebar, will turn the sidebar on and off. The sidebar is located on the left of the File
Manager window and shows the various locations in the file system, Figure 5-99. By default the
sidebar is visible.
Figure 5-99. File Manager - Files menu - Sidebar
5.8.3 Preferences
The Preferences option allows you to control the way that the File Manager looks and behaves.
Views
Behavior
List Columns
Search & Preview
Figure 5-101. File Manager - Files menu - Preferences
5.8.3.1 Views
The Views tab, Figure 5-101, controls the different views of the File Manager.
Sort
List View
Icon View Defaults
5.8.3.1.1 Sort
The Sort folders before files option allows you to control how files and folders are sorted in the File
Manager window. The default is for this option to be checked and means that folders are sorted in
order first and then the files.
The Allowed folders to be expanded option allows you to control how files and folders are displayed in
the File Manager window in List View. The default is for this option to not be checked. When this
option is check, each folder in List View will have a triangle to the left of the folder name. Clicking on
the triangle will expand the folder and show all of the files and folder in the parent folder, Figure 5-102.
The Icon View Captions options allows you to control what is displayed under the filenames in Icon
View. There are three positions that can be configured by clicking the triangles to the right of each
position, Figure 5-103.
Figure 5-103. File Manager - Files menu - Preferences - Icon View Captions
When in Icon View the captions can be seen under the filenames and all captions will be visible when
the view is zoomed in, Figure 5-105.
Figure 5-105. File Manager - Icon View Captions
5.8.3.2 Behavior
The Behavior tab, Figure 5-106, controls the behavior of files in the File Manager.
Figure 5-106. File Manager - Files menu - Preferences - Behavior
Open Action
Link Creation
Executable Text Files
Trash
The Open Action option allows you to choose between a single and a double click to open items such as
files or folders. The default is a double click.
The Link Creation option allows you to create a link for files or folders and adds an option to the right
click menu, Figure 5-107. You also can perform the Create Link by pressing Shift+Ctrl+M when a
file or folder is highlighted.
Figure 5-107. File Manager - Create Link
Figure 5-108 shows the link after it has been created. The link or shortcut can be moved anywhere in
the file system and it will still refer back the original file or directory.
5.8.3.2.4 Trash
The Trash option allows you to choose how files are handled when moving them to the Trash. The
default is to Ask before emptying the Trash. You can also choose to Show action to permanently
delete files and folders which will add a Delete Permanently option to any menu with a Move to
Trash option, Figure 5-109.
You also can perform the Delete Permanently function that bypasses the trash at any time by pressing
Shift+Delete when a file or folder is highlighted.
The List Columns tab, Figure 5-110, controls the columns and the order of the columns in the List
View of the File Manager.
Figure 5-110. File Manager - List Columns
All of the column options can be selected or deselected except for the Name column option. You can
also reset the List Columns to default by clicking the Reset to Default button in the bottom right hand
corner.
The Search & Preview tab, Figure 5-111, controls the way that files and folders are searched for, how
thumbnails are displayed, and controls the file and folder count in the File Manager window.
Search
Thumbnails
File Count
Figure 5-111. File Manager - Preferences
5.8.3.4.1 Search
The Search option allows you to control how subfolder are searched. The default is On this computer
only, which means that network folders from other systems will not be searched. You can choose All
locations which will enable searching of sub folders in network folders or Never which disables
subfolder searching in any folder.
5.8.3.4.2 Thumbnails
The Thumbnails section allows you to configure the use of thumbnails which are small pictures that
shows a representation of the file or in the case of image files, the actual image.
You can choose to show thumbnails for Files on this computer only, All files, or Never.
You can also control the size of files that show thumbnails. The default is files smaller than 10 MB.
The File Count section allows you to configure how items in the folder are counted. You can choose to
count files only in Folders on this computer only, All folders, or Never.
5.8.4 Keyboard Shortcuts
The Keyboard Shortcuts option will show you two pages of shortcuts that can be used in the File
Manager window, Figures 5-112 and 5-113.
5.8.5 Help
The Help option will open a help browser open to the Ubuntu Desktop Guide, Figure 5-114, which is a
web page with hyperlinks that gives you access to all of the Ubuntu help topics. You can also access
Help by pressing F1.
5.8.6 About
Selecting About will open a window with information about Files, the name of the File Manager
program, such a version number and copyright information, Figure 5-115.
Figure 5-115. File Manager - About
5.8.7 Quit
The Quit option will close the current File Manager window. You can also close the current File
Manager window by pressing Ctrl+Q.
6. System Settings
The System Settings can be accessed by clicking on the System Settings icon on the Launcher on the
left side of the screen, Figure 6-1, or by clicking the System Setting icon in the top right hand corner of
the screen and choosing System Settings from the drop down menu, Figure 6-2. Figure 6-3 shows the
System Settings window. The System Settings are divided into three sections, Personal, Hardware,
and System.
Bluetooth
Color
Displays
Keyboard
Mouse & Touchpad
Network
Power
Printers
Sound
Wacom Tablet
Backups
Details
Landscape Service
Software & Updates
Time & Date
Universal Access
User Accounts
6.1 Appearance
Figure 6-4 shows the Appearance settings. The Appearance settings window has two tabs, Look and
Behavior.
On the Look tab you can choose the background color, choose a wallpaper, add or remove wallpaper,
choose a desktop theme, and change the size of the Launcher icons.
Figure 6-4. System Settings - Appearance - Look Tab
6.1.2.1 Wallpapers
Using the + and - buttons under the Wallpapers section you can add and remove pictures to use as
wallpaper. You can even use your own pictures. Clicking on any of the pictures in the wallpaper section
will make selected picture the wallpaper on your desktop.
Changing the size of the Launcher icon changes the size of the icons on the Launcher on the left side
of the desktop. Increasing the size makes the icons easier to see and use, reducing the size creates more
desktop space. The default size is 48.
Figure 6-5 shows the Launcher icons set to the minimum size of 16.
Figure 6-5. System Settings - Appearance - Look Tab - Small Launcher Icons
Figure 6-6 shows the Launcher icons set to the minimum size of 64.
Figure 6-6. System Settings - Appearance - Look Tab - Large Launcher Icons
6.1.2.3 Theme
Changing the theme changes the look of all windows and menus on the desktop.
As changes are made on the Look tab you will be able to see the actual changes happening to the
desktop in real time.
Figure 6-7. System Settings - Appearance - Look Tab - High Contrast Theme
The Behavior tab of the Appearance settings, Figure 6-8, allows you to enable Auto-Hide of the
Launcher on the left hand side of the screen. Enabling Auto-Hide will cause the Launcher to disappear
when not being used. To make the Launcher reappear just move your mouse to the left side of the
screen. You can also adjust the reveal sensitivity.
You can restore the default behavior settings by clicking the button on the bottom left hand side of the
window.
Figure 6-8. System Settings - Appearance - Behavior
6.1.3.1 Workspaces
Workspaces are like virtual desktops. You can have different applications open in different workspaces
and switch between the workspaces. Once enabled the Workspaces icon will appear on the Launcher a
above the Trash icon, Figure 6-11.
Figure 6-12 shows the Workspaces in action. Clicking on any of the workspaces will make that
workspace the current workspace. When you switch from one workspace to another, applications active
in one workspace will stay active on that workspace and the new workspace will show the applications
active only in that workspace. Workspaces is a great way to have multiple applications running without
cluttering up a single desktop.
Figure 6-12. Workspaces in action
The Add show desktop icon to the launcher option, Figure 6-13, creates an icon on the Launcher that
will minimize all open applications and show a clean desktop.
Figure 6-13. System Settings - Appearance - Behavior - Add show desktop icon
Figure 6-14 shows the Show Desktop Icon that is added to the launcher.
Figure 6-16 shows the desktop after the Show Desktop Icon in the Launcher is clicked. All of the open
applications are minimized and show up in the Launcher and the desktop is clean.
Figure 6-16. Desktop - After pressing Show Desktop Icon
The Brightness & Lock settings, Figure 6-17, allow you to adjust the time Ubuntu will wait before
turning off and locking the screen. You can also enable and disable the requirement to provide a
password to unlock the screen once locked. Locking the screen automatically after a short period of
inactivity and requiring a password to unlock the screen is considered a good security practice and
should not be disabled.
Once the Language Support is fully installed you can select Install / Remove Languages to choose the
language to install, Figure 6-19.
Select the language you want to add then click Apply Changes, Figure 6-20.
Figure 6-20. System Settings - Language Support - Install/Remove Languages
Once a language is installed you will have to configure the text input settings which will be covered later
in this chapter.
The Regional Formats tab, Figure 6-21, allows you to control the way that numbers, dates, and
currency are displayed on your system.
Figure 6-21. System Settings - Language Support - Regional Formats
The Online Accounts settings, Figure 6-22, allow you to integrate your online accounts with various
Ubuntu programs. For example, Shotwell is a digital picture manager which can be setup to upload
photos directly to your Facebook, Flickr, or Google accounts. Use the plus on the left side to add an
online account to your Ubuntu system. For security reasons I do not recommend using online accounts.
I recommend that you provide a username and password each time your applications want to access an
an online account.
Figure 6-22. System Settings - Online Accounts
Security and privacy are serious concerns to most people who are active on the Internet. The Security
& Privacy settings allow you to control the security and privacy settings on your Ubuntu system.
Security
Files & Applications
Search
Diagnostics
The Security tab, Figure 6-23, allows you to enable and disable the requirement to provide a password
when Waking from suspend mode and when Returning from a blank screen. You can also configure
the amount of time a screen has been blank for before a password is required.
Requiring a password for both Waking from suspend and Returning from blank screen are good
security practices and should not be disabled.
Figure 6-23. System Settings - Security & Privacy - Security
The File & Applications tab, Figure 6-24, allows you to select which applications to track usage for.
Since applications can be configured to automatically logon using a username and password, tracking
the usage will allow you to see if someone or something is using applications without your permission.
Figure 6-24. System Settings - Security & Privacy - Files & Applications
The Search tab, Figure 6-25, allows you control the inclusion of online search results when searching in
Dash, which is the top icon on the Launcher. With online search turned on, Ubuntu will provide
answers that will include online results. Turning online search off will disable this feature. I prefer to
disable this feature as its make for cleaner search results when I am searching for something on my
Ubuntu system.
The Diagnostic tab, Figure 6-26, allows you to control what information is sent from your Ubuntu
system to Canonical, the makers of Ubuntu, when there are errors with the operating system. By default
Ubuntu will ask for permission anytime it tries to send an error report.
Figure 6-26. System Settings - Security & Privacy - Diagnostics
The Text Entry settings apply when you have more than one input language installed. In Figure 6-27,
the installed language listed is just English even though language support for other languages may have
already been installed. Clicking the + under the Input sources to use: menu will allow you to add
additional language input. You can also define the key combinations that will allow you to toggle
between input methods. Clicking on the Keyboard Settings link in the bottom right hand corner will
take you to the keyboard settings.
Figure 6-27. System Settings - Text Entry
6.7 Bluetooth
The Bluetooth settings, Figure 6-28, allow you to control Bluetooth if it is part of your installed
hardware. You can turn Bluetooth on and off and control the visibility of your Bluetooth device. For
security purposes, I recommend turning off Bluetooth when not needed.
6.8 Color
The Color settings, Figure 6-29, allow you to control the color profile of your monitor.
Figure 6-29. System Settings - Color
6.9 Displays
The Displays settings, Figure 6-30, allow you to set the resolution and rotation of your display. You can
also scale the menu and title bars making the icons larger or smaller depending upon your preference
and detect connected displays. If you have multiple displays connected to your system you can choose
to have the launcher visible on all all displays or only a select display.
6.10 Keyboard
The Keyboard settings has two tabs, Figure 6-31.
Typing
Shortcuts
The Typing tab, Figure 6-31, allows you to control the delay and speed of repeating letters when
holding a key on the keyboard. You can also control the blinking speed of the cursor. The Text Entry
link on the bottom left hand corner of the screen will take you to the Text Entry settings.
The Shortcuts tab, Figure 6-32, allows you to control keyboard shortcuts. You can edit default
shortcuts, remove shortcuts, or add your own shortcuts. The shortcuts are divided into groups on the
left. For each group there are several shortcuts listed in the middle with shortcut key combinations listed
on the right. To edit a shortcut click on the shortcut and press the new key combination.
Figure 6-32. System Settings - Keyboard - Shortcuts
The Mouse & Touchpad settings, Figure 6-33, allow you to control the primary button, the double click
speed, and the pointer speed of the mouse or touchpad. You can also test your settings by clicking the
button in the upper right hand corner of the window.
6.12 Network
The Network settings, Figure 6-34, will be covered in more detail in Chapter 7.
Figure 6-34. System Settings - Network
6.13 Power
The Power settings, Figure 6-35, allow you to control the following battery usage when using a laptop,
suspend time for a laptop or desktop, and the visibility of the battery status in the menu bar.
There will also be a battery charge level display at the bottom of the window when Ubuntu is installed
on a laptop.
For Suspend when inactive for, you have choices for On battery power and When plugged in, each
with its own drop down menu. Each drop down menu contains the following options:
5 minutes
10 minutes
20 minutes
30 minutes
1 hour
2 hours
Don’t suspend
For When power is critically low, the drop down menu contains the following options:
Hibernate
Power off
For Show battery status in the menu bar, the drop down menu contains the following options:
6.14 Printers
The Printer settings, Figure 6-36, allow you add and delete printers from your system. To add a printer
click the Add button.
Most modern printers will be auto-detected by Ubuntu and will include the correct name. You can also
add a network printer. In Figure 6-37, a printer is connected via a USB cable.
Ubuntu needs a printer driver for the printer to function properly, Figure 6-38. You can choose from the
printer database, a printer driver, or search for a driver on the Internet.
If you choose from the database you will have to select the manufacture and click Forward then select
the appropriate driver.
Figure 6-38. System Settings - Printers - Choose Driver
The last step is to provide a description of the printer, Figure 6-39. All of the details should be auto-
populated but you can modify the description.
You will be asked if you want to print a test page, Figure 6-40.
Now that your printer has been added, Figure 6-41, you are ready to print.
Figure 6-41. System Settings - Printers
6.15 Sound
The Sound settings, Figure 6-42, allow you to control the sound on your Ubuntu system. The Sound
settings has four tabs:
Output
Input
Sound Effects
Applications
At the top the Sound settings window, the Output volume, Mute, and Allow louder than 100%
settings allow you to control the overall system sound and remain at the top of the window no matter
what tab you are on along with the Show sound volume in the menu bar at the bottom of the window.
The Output tab, Figure 6-42, allows you to control the output settings for the sound card. You can
control the following:
Output volume
Mute
Louder than 100%
Balance
Fade
Subwoofer
Sound volume in the menu bar
You can also choose where the sound will be played from if there are multiple outputs and test the sound
by clicking the Test Sound button.
The Input tab, Figure 6-42, allows you to control the sound input. You can control the following:
The Applications tab, Figure 6-45, allows you to control the volume of an individual application that is
playing sound. In this example, Rhythmbox is playing music so Rhythmbox shows up with a volume
slider bar and mute check box.
You can modify the performance of the Wacom tablet by adjusting the following items:
Tracking Mode
Left-Handed Orientation
Eraser Pressure Feel
Top Button
Lower Button
Tip Pressure Feel
You can also map the tablet to the monitor by clicking the button on the right hand side of the window.
6.17 Backups
Backing up is a good idea to keep from losing important files and being able to restore files that are lost
or accidentally deleted. Figure 6-47, shows the Backups settings. Backups will be covered in in more
detail in Chapter 10.
Figure 6-47. System Settings - Backup - Overview
6.18 Details
The Details settings show information regarding your Ubuntu system. The following sections are
covered in the Details settings:
Overview
Default Applications
Removable Media
Legal Notice
6.18.1 Overview
The Overview section, Figure 6-48, shows the basic details of your Ubuntu system. The following
items can be viewed:
Device name
Memory
Processor
Graphics
OS Type (32-bit or 64-bit)
Disk size
Figure 6-48. System Settings - Details - Overview
The Default Applications section, Figure 6-49, allows you to control what the default applications are
for various functions and media. The following functions and media can be set:
Web
Mail
Calendar
Music
Video
Photos
Next to each function or media type is a drop down menu that allows you to specify a default
application.
Figure 6-49. System Settings - Details - Default Applications
The Removable Media section, Figure 6-50, allows you control what your system does with different
types of removable media. The following types of media can be controlled:
CD Audio
DVD Video
Music player
Photos
Software
For each type of media, the drop down menu on the right will allow you to choose what action to take
when that particular type of media is detected by the operating system. The default for Media is Ask
what to do. The default for Software is Run Software. Other options include:
For security reasons the Software option should be changed to Ask what to do or Do Nothing. You
should never allow software on removable media to run automatically.
Figure 6-50. System Settings - Details - Removable Media
You can also adjust the settings for other types of media by clicking on the Other Media button. Figure
6-51 shows the listing of the other media types.
Allowing media and software to launch automatically when removable media is connected to a system is
not a good security practice. To mitigate the risk, you can stop this behavior by checking the Never
prompt or start programs on media insertion check box at the bottom of the window, Figure 6-52.
Figure 6-52. System Settings - Details - Removable Media - Never prompt
The Legal Notice section, Figure 6-53, contains various legal notices pertaining to the use of the Ubuntu
operating system with regards to search results from Dash searches. I recommended previously that the
search functionality be restricted and if you read this legal notice you will know why. Basically if you
do not opt out of the Dash search feature your search terms will be sent to Canonical, the makers of
Ubuntu, and other third parties.
Landscape Service, Figure 6-54, is a system management application that allows an administrator to
monitor and administer an Ubuntu network. Landscape Service is outside the scope of this book.
Figure 6-54. System Settings - Landscape Client
Software & Updates settings are used to control such things as where software and updates for your
system are downloaded from, what type of software to install, and when to check for updates.
Ubuntu Software
Other Software
Updates
Authentication
Additional Drivers
The Ubuntu Software tab, Figure 6-55, controls what type of software will be downloaded from the
Internet. The tab has the following types:
You can also control which country and server updates are downloaded from. Choosing a server close to
your current location may improve download performance.
At the very bottom of the window you can also choose to install software updates from the CD-Rom that
was used to install Ubuntu, however, this is not ideal as the software on the CD-Rom will most likely be
out of date.
Figure 6-55. System Settings - Software & Updates - Ubuntu Software
The Other Software tab, Figure 6-56, allows you to choose to add Canonical Partners and Independent
third-party software developers to your sources list.
Figure 6-56. System Settings - Software & Updates - Other Software
6.20.3 Updates
The Updates tab, Figure 6-57, controls the types of updates that get installed, when to check for
updates, when to display security and regular updates, and when to display the availability of new
versions of Ubuntu.
The Authentication tab, Figure 6-58, shows the current authentication keys for trusted software
sources. The authentication keys are used to verify that software and updates are coming from trusted
and verified sources. You can import and delete keys from this tab.
Figure 6-58. System Settings - Software & Updates - Authentication
When Ubuntu detects hardware that has a proprietary driver it will be displayed in the Additional
Drivers tab, Figure 6-59. You will be to enable and disable the use of proprietary drivers on this tab.
Figure 6-59. System Settings - Software & Updates - Additional Drivers
The Time & Date settings, Figure 6-60, has two tabs:
The Time & Date tab, Figure 6-60, allows you control the timezone of your Ubuntu system. The Time
& Date tab has an interactive map that allows you to choose your timezone by clicking on a location on
the map. This map is the same map that was used to set the timezone during the installation process.
You can also choose to set the system time manually or set the time Automatically from the Internet
via the Network Time Protocol (NTP). Using NTP is the most accurate way to set the time on your
system.
If you choose to set the time manually the time controls at the bottom of the window will be activated.
Figure 6-60. System Settings - Time & Date
The Clock tab, Figure 6-61, allows you to control the behavior of the clock display on the desktop. You
can control where the clock is displayed and the format of the clock.
Seeing
Hearing
Typing
Pointing and Clicking
The Seeing tab, Figure 6-62, allows you to turn on a High Contrast screen, Large Text, a Screen
Reader, and a Beep on Caps and Num Lock for easier viewing and to assist people who have
difficulty viewing the screen.
The Hearing tab, Figure 6-63, allows you to turn on Visual Alerts for people who have difficulty
hearing. You can choose to have the window title or the entire screen flash when there is an alert sound.
You can also test the flash alert.
You can access the Sound Settings by clicking the link in the lower right hand corner.
Figure 6-63. System Settings - Universal Access - Hearing
The Typing tab, Figure 6-64, allows you to turn on Sticky Keys, Slow Keys, and Bounce Keys. This
tab also allows you to enable the ability to turn accessibility features on and off using the keyboard.
Sticky Keys allow the use of keys such as Alt, Ctrl, or Shift by pressing the key once and it will remain
active without having to hold the key. This helps reduce strain on the hands when typing for a long
period of time.
Slow Keys creates a delay between when a key is pressed and when the input is accepted. The key must
be held for the specified duration before the input is accepted.
Bounce Keys allow you to configure the ignoring of repeated rapid pressing of the same key.
Figure 6-64. System Settings - Universal Access - Typing
The Pointing and Clicking tab, Figure 6-65, allows you to enable Mouse Keys, Simulated Secondary
Click, and Hover Click as well and access the Mouse Settings by clicking the link in the bottom right
hand corner.
Mouse Keys allows you to use the number pad on your keyboard to control the mouse pointer vice
using an actual mouse.
Simulated Secondary Click allows you to configure the mouse to interpret holding a mouse button as
doubleclick vice a single click.
Hover Click allows you to configure the mouse to trigger a click when you hover over an area of the
screen such as a hyperlink.
Figure 6-65. System Settings - Universal Access - Pointing and Clicking
The User Accounts settings, Figure 6-66, allow you to create new user accounts and administer existing
user accounts. In the upper right hand corner of the window there is an Unlock button. Prior to making
any changes to a user account you will need to click this button and provide your password to unlock the
User Accounts settings.
The usernames are listed on the left side of the window with the information for the highlighted user
account on the right side of the window. For each user account the following information is provided:
Username
Account type
Language
Password (hidden)
Automatic Login
Last Login
To change a user’s password click on the 5 dots next to Password which will bring up the password
change dialog box, Figure 6-67. If you are changing the password for the account in use you will need
to provide the current password as well as the new password. Clicking the small gears on the right of the
new password text box will create a random password.
As you enter the new password, the password strength bar will indicate the strength of the password.
For security purposes you want to always create a strong password. Clicking on the How to choose a
strong password link in the lower left hand corner will open a browser window with a tutorial on how
to create a strong password.
Once you are done entering the new password and confirming the password by entering it again you
must click Change to change the password.
For each account there is a history of system access. Highlighting an account and clicking the History
button in the bottom right hand corner of the window, Figure 6-68, will bring up the Login History
dialog box, Figure 6-69.
Figure 6-68. System Settings - User Accounts - History button
Using the arrow buttons on the right and left on the top of the dialog box, you can page through the
history one week at a time.
To add a user account press the + button under the list of user accounts on the right side of the Account
settings window. The Add Account dialog box is shown in Figure 6-70. The Add Account dialog box
allows you to choose what type of user to add, a standard user or an administrator, fill in the full name,
and specify a username.
If the + button is greyed out and you are unable to create an account you will need to click the Unlock
button, Figure 6-70, in the upper right hand corner of the window. You will need to authenticate in order
to add an account.
Figure 6-71 shows the Add Account dialog filled in with an example account. Click the Add button to
add the account.
Figure 6-71. System Settings - User Accounts - Add Account
The new account will now be displayed on the left side of the User Accounts settings window, Figure
6-72. By default new accounts are disabled until a password is set. To set the password, make sure the
User Accounts settings is unlocked, upper right hand corner, and then click on Account Disabled to
bring up the Changing password for dialog box, Figure 6-73.
The Changing password for dialog box for setting a new password is a little different from the dialog
box you get when changing the password on an account that already has a password. Since this is the
initial password for the new account you will not be asked for the current password, just the new
password and to confirm the password. You also have the following options in the drop down menu at
the top of the dialog box, Figure 6-74:
The dialog box also contains the password strength meter, the gears to create a random password, the
Show password check box, and a link to the help page How to choose a strong password.
Once a user’s password is set, click the Change button, Figure 6-75, to change the password.
Figure 6-75. System Settings - User Accounts - Set a password
Now that the initial password has been set the user account is enable and ready for use, Figure 6-76.
Figure 6-76. System Settings - User Accounts - New Account password set
Once an account is created you can choose a picture to associate with an account. Click on the outline
of the head next to the account name, Figure 6-77, to bring up the picture menu, Figure 6-78.
Figure 6-77. System Settings - User Accounts - Change Picture
You can select a picture from the default library, open your open picture, or take a picture with the
system’s built in camera if it has one.
Once a picture has been selected, it will replace the head outline, Figure 6-79.
Figure 6-79. System Settings - User Accounts - New Picture Set
To rename a user account, unlock the User Accounts settings and click on the user account name,
Figure 6-80. The username will now be editable. Type the new username and press Enter to complete
the change.
To change the account type, unlock the User Accounts settings and click on the Account Type, Figure
6-81. The options are Standard and Administrator.
Figure 6-81. System Settings - User Accounts - Change account type
To delete a user account, highlight the account and press the - button under the list of user accounts on
the right side of the Account Settings window, Figure 6-82.
The Delete Account dialog box is shown in Figure 6-83. You will have three options:
Delete Files
Keep Files
Cancel
Figure 6-83. System Settings - User Accounts - Delete an account
7. Network Configuration
The Network Configuration can be accessed via the System Settings or the Network Icon in the upper
right hand corner of the desktop.
The Network Settings window is shown in Figure 7-1. For the most part there is little to no network
configuration required for your Ubuntu system unless you require more advanced configurations such as
static IP addresses or VPN connections. Out of the box Ubuntu will auto-detect Ethernet and wireless
connections and automatically obtain an IP address from a Dynamic Host Control Protocol (DHCP)
server, most likely your home router. For a wireless connections a password may be required to access
a wireless network.
The main Network Settings window will show the hardware or MAC address, the IP address, Default
Route or Default Gateway, and the DNS server, if your computer is connected to a network. There are
buttons on the right for turning Airplane mode on and off and turning the network connection on and
off.
In Figure 7-2, the wired network connection has been turned off so all of the corresponding network
information is gone. The only information displayed is the hardware address which is not dependent
upon the network connection.
Figure 7-2. Network Settings - Disconnected
To configure a network connection, click on the network connection name and then click the Options
button in the bottom right hand corner, Figure 7-3.
General
Ethernet
802.1x Security
DCB
IPv4 Settings
IPv6 Settings
Figure 7-4 shows the options on the Ethernet tab for the Wired network connection. On this screen
you can edit the name of the connection, clone the MAC address, and adjust the MTU. All of these
items are advanced configuration options and will not be covered in this book. I do not recommend
changing anything on this tab other than the connection name.
Figure 7-5 shows the General tab of the Wired Connection settings. On this tab there are checkboxes
for automatic connections for both the network and Virtual Private Network (VPN) as well as for
allowing or disallowing all users to connect to the network. For most users these options will not be
changed unless you are using a Virtual Private Network (VPN).
Figure 7-5. Network Settings - General
Figure 7-6 shows the 802.1x Security tab of the Wired Connection settings. 801.1x is a protocol that
allows authentication of devices attempting to connect to a Local Area Network (LAN) and is beyond
the scope of this book. Unless you are connecting to a network that requires 802.1x authentication you
will normally not change any of the settings on this tab. If you do need to connect to an 802.1x
protected network, consult your network administrator for the proper settings.
Figure 7-6. Network Settings - 802.1x Security
Figure 7-7 shows the Data Center Bridging (DCB) settings tab of Wired Connection settings. DCB is
used for clustering and storage area network in the data center and is outside of the scope of this book.
Figure 7-7. Network Settings - Data Center Bridging
Figure 7-8 shows the IPv4 Settings tab of the Wired Connection settings. On this tab you can
configure Automatic (DHCP) or static IPv4 addresses for your network connection. Most users will
utilize DHCP to obtain an IP address and will not need to make any changes to this tab.
Figure 7-8. Network Settings - IPv4 Settings
Figure 7-9 shows the IPv6 Settings tab of the Wired Connection settings. IPv6 is a replacement for
IPv4 but has not taken hold as fast as was originally expected. On this tab you can configure Automatic
(DHCP) or static IPv6 addresses for your network connection. Most users will utilize IPv4 for their
network connections and will not need to make any changes on this tab.
Figure 7-9. Network Settings - IPv6 Settings
Most of your network connections will be utilizing IPv4. Figure 7-10 shows the IPv4 Settings tab of the
Wired Connection settings with the connection methods displayed. Of the options displayed, the two
most common settings are Automatic (DHCP) and Manual.
Figure 7-10. Network Settings - IPv4 - Method
7.2.1 DHCP
The Automatic (DHCP) setting is the default setting and is the setting used by most Ubuntu Linux
users. When utilizing DHCP all of the necessary network parameters are provided over the network,
either wired or wireless, by a DHCP server and no configuration is required by the user.
The Manual setting allows for the assignment of a static IP address. A static IP address may be
required in certain situations where a DHCP server is not available or the system needs to always have
the same IP address. You will need to obtain the IP address, network mask, gateway IP, and DNS server
IP from your network administrator in order to complete the configuration.
Figure 7-11 shows the IPv4 Settings tab of the Wired Connection settings with the Manual Method
selected. Once selected the Addresses section will become editable. Click the Add button on the right
and you will be able to enter the IP address, Netmask, and Gateway for this connection. You will also
need to add a DNS server IP.
Once the configuration is saved you will be taken back to the main Network Settings window, Figure
7-12, which will show the changes you have made.
The Network Proxy settings, Figure 7-13, allow you to configure a network proxy. You will have to
contact your network administrator to find out if your network uses a Network Proxy. Most home
networks do not use a network proxy.
The first configuration option is the Method which will be Manual or Automatic.
The Manual configuration method, Figure 7-14, allows for the configuration of HTTP, HTTPS, FTP,
and Socks Host.
HTTP is for normal web traffic. This is any web site that starts with http:\\ in the URL.
HTTPS is for encrypted SSL/TLS sessions. This is any web site that start with https:\\ in the URL.
FTP for is the File Transfer Protocol and is used to transfer files between computers. Socks Host is a
SOCKS server that proxies TCP and UDP connections. A SOCKS proxy can handle more than just
HTTP, HTTPS, and FTP.
Figure 7-14. Network Settings - Proxy Settings - Manual
The Automatic configuration method, Figure 7-15, allows for the configuration of a Network Proxy by
providing a configuration URL that will tell your system where to pull the configuration information
from. You will have to contact your network administrator to find out your configuration URL.
7.3 Wireless
If your system has wireless network functionality, the network settings will include wireless
configuration options. Figure 7-16 shows the Network Settings window with the Wireless option.
On the right hand side of the window will be a list of wireless access points that are in range. Each
wireless network will display the access point name, signal strength, and if authentication is required by
displaying a lock icon. At the top of the window is the button to turn the Wireless on and off as well as
turn on and off Airplane Mode.
At the bottom of the window are buttons for using the system as a hotspot and connecting to a hidden
network.
The orange arrow on the right hand side of the window leads to additional information about the
wireless network.
Figure 7-16. Network Settings - Wireless Settings
Figure 7-17 shows the additional information window for a wireless network. The information contains
the following:
There are buttons for disconnecting the network, forgetting the network, and accessing the settings for
the network.
Figure 7-17. Network Settings - Wireless Settings
7.3.1 Hotspot
Using your Ubuntu Linux system as a Wireless Hotspot allows you to share a wired connection
wirelessly with other systems such as a tablet or other laptop. In order for Wireless Hotspot to work
there has to be a wired connection (Ethernet) available. You can not share a wireless connection.
7.3.2 Authentication
If you try to access a wireless network that requires authentication you will be prompted with an
authentication dialog box, Figure 7-19.
To authenticate to the wireless network, type the password and click Connect. You can also choose to
show the password while you are tying by clicking the Show password checkbox.
Most wireless networks broadcast their SSID so that users can easily find the network. Some networks,
however, do not broadcast their SSID as a security measure. In the case of a network that is hidden and
does not broadcast the SSID, you will have to obtain the information from the network administrator.
Using the information such as the Network name or SSID and the Wi-Fi security settings to you can
connect to hidden wireless network, Figure 7-20.
One of the things I really like about Linux and especially Ubuntu is the amount of free software that is
available. In the past you would have to search the Internet for software to install on your Linux system
and go through very difficult installation procedures. Most Linux systems and especially Ubuntu make
the installation of software very easy.
The Ubuntu Software makes the task of finding and installing software on your system a snap. The
Ubuntu Software can be reached by clicking on the Ubuntu Software icon on the Launcher, Figure
8-1.
The Ubuntu Software main window, Figure 8-2, has tabs on the top for All , Installed, and Updates as
well as a search bar on the top of the window.
By default the Ubuntu Software window open in the All tab, Figure 8-2. The top sections will show
Editor’s Picks and Recommended software of various categories. Each time you open Software the
Recommended category may change.
At the bottom of the Ubuntu Software window there will be a list of software categories, Figure 8-3.
Clicking on any of these categories will show a subset of the available software associated with that
category.
Figure 8-2. Ubuntu Software
Figure 8-3. Ubuntu Software - All Software - Categories
Figure 8-4 shows the Utilities category. On the left hand side the category is further subdivided into
subcategories with the default view being Featured.
Figure 8-4. Ubuntu Software - All Software - Utilities Categories
The Installed tab, Figure 8-5, shows all of the software on your installed via Ubuntu Software. Next to
each software package is a Remove button that allows you to uninstall the software.
Figure 8-5. Ubuntu Software - Installed
The Updates tab, Figure 8-6, shows the updates available for your system. The tab will have a number
in red that indicates the number of available updates. Clicking on the Install button next to each update
will install the update.
Figure 8-6. Ubuntu Software - Updates
Once you identify a software package you want to install, highlight the software package and click the
install button on the right hand side, Figure 8-7. You can also click on software name to see additional
information about the software package before you install the software.
Figure 8-9 shows software information screen about a popular software package named VLC, which is a
media player. If this is the software package you want to can click, the Install button to start the
installation.
Figure 8-9. Ubuntu Software Center - More Info
Before the software can be installed you must authenticate by providing your password, Figure 8-10.
Once the installation is complete the software will show as installed, Figure 8-11, the Install button will
change to a Remove button which can be used to remove the software package. There will also be a
Launch button that can be used to start the software.
Figure 8-11. Ubuntu Software Center
To remove an installed software package find the software in the list of installed software and click the
Remove button on the right hand side, Figure 8-12.
8.4 apt-get
Apt-get is the Ubuntu command line software management tool. Apt stands for Advanced Packaging
Tool. Apt-get is covered in Chapter 11.
9. E-mail
While most people today tend to get their email either on their smart phones or via a webmail service,
some people still like to get their email via an email software client on their desktop or laptop. Ubuntu
comes with an email software client named Thunderbird. While there are other email client software
out there I am only going to cover Thunderbird in this book since it is the default.
To find Thunderbird, open a search and type thun and the Thunderbird Mail icon will appear, Figure
9-1. Click on the Thunderbird Mail icon to open the email program.
If this is the first time you have run Thunderbird you will have to configure the email program to fetch
your email from your ISP or email provider. Thunderbird will also give you the option of setting up a
new email address with gandi.net if you want to, Figure 9-2. You have the option of skipping this step
and using your existing email account or configuring your email client later.
Figure 9-2. Thunderbird - New email address
If you choose to continue with the configuration, you will be asked for your name, email address, and
password for your email account, Figure 9-3. You will also have the option of allowing the software to
remember your password to make accessing your email account easier. For security reasons I do not
recommend selecting this option.
When you click Continue, Thunderbird will look in the ISP database for configuration information and
will present you with an option for IMAP or POP3, Figure 9-4.
IMAP is a protocol that allows access to folders on a remote email server. The email is stored on the
server and your email client can access the email when online and will retain an offline copy when not
connected. When connected the email client will synchronize with the remote server so that the server
and the email client have the same information.
POP3 is a protocol that pulls a copy of the email from the server and stores it on the local desktop or
laptop. The email client only connects to the server to retrieve the email.
Once the configuration is done and if the username and password are correct, you will be presented with
your email, Figure 9-5.
Figure 9-5. Thunderbird
10. Backups
Backing up your Ubuntu system is a good idea to keep from losing important files and being able to
restore files that are lost or accidentally deleted. The Backups settings allow you to configure backups
for your system.
10.1 Overview
The Overview settings, Figure 10-1, allows you restore from a previous backup and to schedule a future
backup. You can also turn backups on and off by using the slider in the top right hand side of the
window.
In the Folders to save settings, Figure 10-2, you can add and remove folders to include in your backup.
By default your home folder is added to the backup.
Figure 10-2. System Settings - Backup - Folders to save
The Folders to ignore settings, Figure 10-3, allows you to exclude folders from the backup. By default
the Trash and Downloads folders in your Home folder is excluded from backups.
The Storage Location settings, Figure 10-4, allow you to specify the location to store the backup.
Figure 10-4. System Settings - Backup - Storage Locations
10.5 Scheduling
The Scheduling settings, Figure 10-5, allow you to schedule when you want your backup to occur and
how long to keep backups.
While this book is a beginner book and most Linux beginners do not need to access the terminal, no
book on Linux would be complete without a some discussion of the terminal or command line interface
(CLI).
Today we live in a very graphical world as far as our computers and devices are concerned. From our
computers to our tablets and smartphones there is not a lot you cannot do with our clicking or tapping on
an icon or link. While this may be good for the average user, for the power user and administrator it
causes a loss of a skill set that used to be very necessary.
Linux is a very powerful operating system with a lot of tools that can be accessed without a graphical
user interface (GUI) and in fact there may be times when a GUI is not even an option such as when you
make a remote connect via SSH and are only given a CLI. Having the skills to navigate and operate in
a CLI is a very important skill for a Linux administrator.
The real power of Linux is found in the CLI. The CLI gives you direct access, with the proper
permissions, to the configuration files that make Linux run. If you really want to be a Linux guru then
you have to become comfortable in the command line.
In this book I am not going to make you a CLI guru. I am just going to touch on the most popular
commands and commands needed to run your system.
I like to think of it like driving a car. When I learned how to drive a car my mom taught me on her stick
shift car. While it may have been a little more difficult for a new driver to master the art of using a
clutch, gas pedal, and stick shift, the lessons stayed with me even today. Now I can drive an automatic
or stick shift. Compare this to a driver that learned on an automatic transmission, like my son. He has
his license and is a very good driver but if I put him in a stick shift car he would not know what to do.
The Linux CLI is like the stick shift and the GUI is like the automatic.
For the most part, all of your interactions with the CLI will be using text typed in via the keyboard.
There are some programs that have a pseudo-graphical look then but there is no mouse and no pointing
and clicking allowed. You will use the tab and arrow keys to move around the options.
When I was in highschool I took a business class that included using a typing tutor to learn how to not
hunt and peck on the keyboard. The typing skills I learned has served me well and I can now type
without looking at the keys.
If you are going to spend any length of time on the CLI and plan to be a Linux administrator I would
highly suggest investing some time and effort into learning how to type if you do not already know how.
11.2 Bash
The Linux CLI is an interactive shell that accepts commands from the user and provides output on the
same CLI.
In Ubuntu Linux the default shell is the Bash shell. Bash stands for Bourne Again Shell. The Bourne
Shell (sh) was a popular shell of Unix operating system that was released in 1977.
The BASH shell takes elements of the Bourne Shell (sh) and combines it with some of the best elements
from the Korn Shell (ksh) and C Shell (csh). It was developed by Brian Fox for the GNU Project to
replace the Bourne Shell.
All of the commands and example in this book are from the Bash shell.
Figure 11-1 shows the terminal window or CLI. You can open a terminal window by pressing
Ctrl+Alt+T or searching for the terminal application.
Any time you open a terminal window you will get a terminal prompt. The terminal prompt includes
some basic information about your system. The first part is your username followed by the @ symbol.
Next is the hostname of your system followed by :~$ then a flashing square.
You use the terminal by typing commands that you want the interactive shell to execute.
11.3.1 echo
The echo command is a pretty basic bash command that will help demonstrate how an interactive shell
works.
The echo command in it’s basic form takes a line of text and prints it back out to the command line also
known as stdout, standard output. There is also stdin which is the input you type on the command line
and stderr which is where errors are displayed which is also the command line. In Figure 11-2 the echo
command is used to print a line of text back to command line.
In Figure 11-3, the echo command is used to put the line of text into a file named testfile. There is not
output to the command line or an indication that anything took place. This is typical for Linux CLI
operations. If the command works there may not be any output.
The > character is what is known as a redirect because it redirects the output to somewhere else besides
stdout.
You can also use the >> characters to redirect as well. The difference between > and >> is that the >
redirect will overwrite that contents of a file and the >> redirect will append or add to the contents of the
file.
11.3.2 cat
To see the contents of a file you can use the cat command. Just type cat and the name of the file.
One nice feature of the bash shell is the bash history file. Every command you type in the CLI is saved
to the history file. You can see your history file by typing the history command, Figure 11-5.
Figure 11-5. history command
You can also scroll backward and forward through the commands that you have typed. For example if
you want to repeat a command that you used 3 command ago press the up arrow 3 times and the
command will appear on the commandline. You can press enter to execute the command again or edit
the command.
Using history -c will clear your command history. When using this command, you will enter the
command, history, and -c to perform the operation. The - character indicates that what follows is option
to the command. The c option means to clear the history file.
11.3.4 Help
The help command can be used to view the command usage and options for a command. In Figure 11-6
the help command is used to view the options for the history command.
Figure 11-6. help command
The Bash shell has a number of shortcuts that you can use to move around on the line that you are
currently working on. We have a tendency to automatically go to either the backspace key or the arrow
keys to move back and forth on the current line to correct a mistake or make a change. Knowing bash
shortcuts can make you much more efficient on the command line and save you time. I highly
recommend learning these shortcuts if you are going to use the CLI on a frequent basis. Figure 11-7
shows the CLI shortcuts and their results.
Figure 11-7. CLI shortcuts
The tab key is another powerful tool in the CLI. Pressing the tab key after typing just a few characters
will autocomplete a command that starts with the characters typed. If more than one command starts
with the same characters all matching commands will be displayed.
For example if you type his and then press the tab key bash will autocomplete history as this is the only
command that starts with his.
If you type hi and press the tab key you will get more than one choice as there are multiple commands
that start with hi. Figure 11-8 shows there are 3 commands that start with hi.
If you make your first letter or letters too ambiguous such as just typing the letter c and pressing tab you
may get more possibilities than you wanted. In Figure 11-9 there are 140 commands that start with the
letter c so Bash is asking if you really want to display all 140 possibilities. If you want to see all 140
possibilites press y or else press n and trying adding more letters to narrow down the possibilities.
Figure 11-9. Display all possibilities?
In a Linux system, everything is a file. Files are files, directories are files, and devices are files. In this
book we will examine the file system and how to work with the different types of files and directories.
The Linux file system uses a hierarchical tree structure that starts with root which is represented by the /
character in Figure 11-10. All other directories are nested under root. Not all directories are shown and
your version of Linux may be a little bit different.
Figure 11-11 shows the ls command run in the root directory of an Ubuntu system. The ls command is
used to list the contents of the current directory which is the root directory.
Figure 11-11. ls command
Below is a list of the most common Linux directories and their function.
/bin - Holds programs that can be accessed by the system, the root user, and normal system users.
/boot - Holds the system startup files and the system kernel, vmlinuz.
/cdrom - Holds the disk when a CD or DVD is inserted into the system.
/dev - Holds device files which represent all of the hardware on the system.
/sys - A virtual filesystem that holds data about and allows modification of system devices.
The Linux file system has several different file types. Figure 11-12 lists the file types and their
corresponding symbol.
Now that you know what the file types and symbols are, let’s look at where you can see the file types
and their symbols.
When you list files using the ls command with the -l option, long list, you will be able to see the file
types. Figure 11-13 shows output of the ls -l command. There is one file named myfile, 1 link named
myfile2, and 1 directory named mydir.
The output of the ls -l command includes the following information about the file myfile1 on the left
hand side.
-rw-rw-r--
In this output the first - character means that this is a regular file.
The output includes the following information about the link myfile2.
lrwxrwxrwx
In this output the first l character means that this is a link. More on links later.
The output includes the following information about the directory mydir.
drwxrwxr-x
11.4.2 Where am I?
When using the Linux operating system from the CLI, understanding the filesystem structure and
knowing how to move around in the file system is very important. In Linux everything is either a file or
a process.
The base of the file system is the root partition which is represented by the / character. All other
directories are located under the root directory. Do not get the root directory confused with the root user
which is the administrator. There is a directory named root which is the home directory of the root user
which is located directory off the root of the file system.
Every user is given a home directory on a Linux system. When you open the CLI you will be taken to
your home directory by default.
11.4.3 pwd
The pwd command, which stand for print working directory, is used to print the current working
directory to the command line. This allows you to see where you are in the file system. Figure 3-5,
shows the use of the the pwd command from the user’s home directory. In Figure 11-14, /home/matt, is
the “absolute” path since it starts with the / character which represents the root directory. It is called the
absolute path since it indicates location absolutely.
11.4.4 cd
The cd command, which stands for change directory, is used to move between directories in the file
system. You can use the absolute path or the relative path to specify a location to change to with the cd
command.
The relative path does not start with the / character and indicates a location relative to the current
location. For example, if you want to change from your home directory to a folder named myfolder in
your home directory you would use the following command.
cd myfolder
In the command above myfolder is a relative path as it was relative to the home folder. If the home
folder has a directory named myfolder you will able to change into that directory.
In most Linux distributions the command line prompt changes as you move through the file structure.
The current location is part of the command line prompt. In Figure 11-15, the ~ character indicates the
current user’s home directory.
The default for most Linux distributions is to start the CLI in the user’s home directory.
Figure 11-15. ~ indicates the home directory
When the current location is changed with the cd command the prompt will change accordingly. In
Figure 11-16, the cd command is used to change to the myfolder directory which is located in the home
directory. The command prompt changes to ~/myfolder.
You can use the absolute path to make the same directory change. In Figure 11-17, an absolute path
starting from / is used to change to the myfolder directory.
As you can see the result is the same but using the absolute path you can get to myfolder from anywhere
in the filesystem. Using the relative path you have to already be in the home directory. Also notice that
the command prompt still uses the ~ character to indicate the home directory even though the absolute
path was used with the cd command.
There are several file system shortcuts that will help you move around the file system or indicate
directories in the file system.
11.4.5.1 Go Home
The ~ character means the current user’s home directory. When used in conjunction with the cd
command it will take you to the current user’s home directory.
In Figure 11-18, the example starts in the root directory, /, and verifies this with the pwd command.
Then the cd ~ command is used to move to the home directory and verifies this with the pwd command.
Figure 11-18. cd ~
No matter where you are in the filesystem, cd ~ will always take you to your home directory.
11.4.5.2 Go Back
The - character means the last directory and can be used to go back to the directory you just left. In
Figure 11-19, the example starts in the /home/matt/myfolder directory and moves to the root directory
using the cd / command and then moves back to the /home/matt/myfolder directory using the cd -
command.
Figure 11-19. cd -
The ../ set of characters is used to move back one directory in the filesystem. If you are in a directory
and want to back up one directory in the tree you can use ../ to with the cd command.
In Figure 11-20, the example starts in the /home/matt/myfolder directory. The cd ../ command is used
to move back one directory to the /home/matt directory.
Figure 11-20. cd ../
You can also combine multiple ../ sets together to move back more than one directory. In Figure 11-21,
the example starts in the /home/matt/myfolder directory. The cd ../../../ command is used to move back
three directories to the / or root directory.
The ./ characters mean the current directory. The ./ shortcut is usually used when executing scripts in
the current directory.
Another useful command is the ls command which stands for list. The ls command is used to list the
contents of a directory.
11.4.6.1 ls
The ls command used without any options gives a list of the file names only listed from left to right,
Figure 11-22.
Figure 11-22. ls
Using the ls command with the -l option, which stands for long list, provides additional details about
file, Figure 11-23. The long list option provides additional details such as file permissions and file
owners, file size, and last modified date.
Figure 11-23. ls -l
Figure 11-24 shows the columns that are shown using the ls -l command.
Hard links show how many links or shortcuts to the same inode exist. Inodes and Hard links will be
covered in more detail later in this chapter.
The Owner is normally the user that created the file unless the owner of the file is changed.
The Group is normally the main group that the user that created the file belongs to unless the group is
changed.
Files in the Linux filesystem can be hidden by starting the filename with a . character. Using normal ls
commands hidden files can not be seen. To see hidden files you have to add the -a option which statnds
for all files.
In Figure 11-25, the ls -l command is used to view the files in the myfolder directory. Then the a option
is added to the ls -l command to view hidden files.
Figure 11-25. ls -la
There are many ways to create files and directories in Linux. In this section we will go over some of the
common ways to use the CLI to create files and directories.
11.4.7.1 touch
The touch command is a quick and easy way to create a blank file. In Figure 11-26, the touch
command is used to make 3 files. The ls -l command is used to list the files. Notice that all of the files
have a 0 in the size column.
Figure 11-26. touch
You can also touch an existing file which will change the last modified date but will not change
anything in the file.
11.4.7.2 mkdir
In any filesystem, you will want to be able to make a directory to hold your files. The mkdir command
will allow you to make a directory in Linux. In Figure 11-27, the mkdir command is used to make a
new directory named myfolder in the current user’s home directory and the cd command is used to
move into the new directory.
There are many ways to remove or delete files and directories in Linux. In this section we will go over
some of the common ways to use the CLI to remove files and directories.
11.4.8.1 rm
The rm command, remove, can be used to remove both files and directories from the filesystem.
In Figure 11-28, the ls command is used to list the files in myfolder, the rm command is used to remove
a file named myfile1, and the ls command is used to verify that the file has been removed.
Figure 11-28. rm
Be careful when using the rm command. Most Linux distributions do not ask for confirmation when
using the rm command so once the command is executed the file or directory is gone. You can add the -i
option to force the rm command to ask first before deleting the file as in Figure 11-29. To remove the
file answer y or n to not remove the file.
Figure 11-29. rm -i
11.4.8.2 Wildcards
The rm command can use the wildcard characters * and ? to delete more than one file at a time. The
wildcard character * matches any number of characters while the ? matches only one character. Figure
11-30 shows the rm command being used to delete all files that start with myfile and end with any
number of characters. Since the * wildcard characters is used the myfile* matches all of the files seen
with the ls command.
Figure 11-31 shows the rm command being used to delete all files that start with myfile and end with
any one character. Since the ? wildcard characters is used the myfile? does not match all of the files.
Figure11-31. rm with the ? wildcard
You can also use square brackets [ ] to define a range. In Figure 11-32, the range is [2-5] so myfile2,
myfile2, myfile4, and myfile5 will be deleted but myfile1 and myfile6 will not be deleted.
Figure 11-32. rm with a range
11.4.8.3 rm -r
The rm command can also be used to remove directories. By default a directory has to be empty before
it can be deleted using the rm command unless the -r option is used. The -r option stands for recursive
which means the rm command will go into the directory specified, delete all of the files, then delete the
directory.
In Figure 11-33, the myfolder directory has 3 files. If the rm command is used without any options you
will get an error since myfolder is a directory. You must use the -r option to delete the files and the
directory.
Figure 11-33. rm -r to delete a directory with files
If the directory is empty you can use the -d option, which means directory, to delete an empty directory,
Figure 11-34.
If the directory is not empty you will get a Directory not empty error, Figure 11-35.
The rmdir command is used to remove an empty directory. The rmdir command does not have a -r
option like the rm command to remove a directory with files so if you want to remove the directory and
the files with one command you will need to use the rm -r command.
In Figure 11-36, the rmdir command is used to remove the empty myfolder directory.
Each file and directory in a Linux file system has three sets of permissions, owner, group, and others.
Each set of permissions has three permission settings, read, write, and execute. Figure 11-37 shows the
permissions for the Linux file system.
Figure 11-38 shows the output of the ls -l command. There is a file named myfile1 with the following
permissions.
-rw-rw-r--
Next to the permissions in the ls -l output is the number of links a file has, more on links later, the owner
of the file, the group owner, the size of the file, last modified date, and the file name. Figure 11-39 is a
breakdown of the ls -l output for myfile1.
The Sticky Bit is a special permission that can be assigned to a file or directory that means a file can
only be deleted by the owner or root. By default a file or directory can be deleted by any user who has
read and write permissions.
The Sticky Bit shows up in the file permissions as a T after the permissions. The following example
shows the Sticky Bit set:
-rw-rw-r--T
Now that you understand file and directory permissions let’s take a look at how to change file and
directory permissions.
11.4.9.2.1 chmod
The chmod command is used to change permissions on a file or directory. There are two ways to use
the chmod command, with letters or numbers. Using letters has 3 parts, the target, the operation, and
the the permission. Figure 11-40 shows the chmod command target designators and their meaning.
Figure 11-40. chmod target designators
Figure 11-41 shows the chmod command operators and their meaning.
Figure 11-42 shows the chmod command permissions and their meaning.
To add a permission to or remove a permission from a file you use the chmod command with the target,
operator, and permission.
In Figure 11-43, the execute permission is added for the owner of myfile1. The ls -l command is used to
examine the permissions of myfile1 which are rw-rw-r--. The chmod command is used with the u+x
option to add the execute permission for the owner only with the resulting permissions rwxrw-r--.
Figure 11-44, shows the execute permission for all, owner, group, and others, being added to myfile1.
The ls -l command is used to examine the permissions of myfile1 which are rw-rw-r--. The chmod
command is used with the a+x option to add the execute permission for all and the resulting permissions
are rwxrwxr-x.
Figure 11-45 shows the write permission for the group being removed from myfile1. The ls -l command
is used to examine the permissions of myfile1 which are rwxrwxr-x. The chmod command is used
with the g-w option to remove the write permission for the group and the resulting permissions are
rwxr-xr-x.
You can also combine operations together to change more than one permissions at a time on the same
file. In Figure 11-46, the chmod command is used with the a+x and g-w options separated by a
comma. Be sure not to put any space before or after the comma or the command will fail.
Figure 11-46. chmod a+x,g-w
You can also combine targets and permissions. In Figure 11-47, the u and g targets are combined and
the w and x permission are combined. The chmod ug-wx command below removes the write and
execute permissions from the owner and group for myfile1.
The other method for using the chmod command is with numbers. In this method each permissions is
assigned a numerical value as seen in Figure 11-48.
You can assign a single permission, such a read, using the number 4 or multiple permissions by adding
the numbers together. The read and write permissions together would be 4+2=6. All permissions
together would be 4+2+1=7, Figure 11-49. To set no permissions use a 0.
Figure 11-49. read, write, execute combinations
Each file or directory has 3 sets of permissions and when using the numerical method all 3 sets have to
be accounted for.
As you learned previously, the first set of permissions is for the owner, the second set is for the group,
and the third set is for all others.
In Figure 11-50, the chmod command is used with the 746 option to set the permissions on myfile1 to
rwxr--rw- using the numerical method. The 7 means read, write, and execute, the 4 means read, and the
6 means read and write.
There is one other permission that can be set using the chmod command known as the Sticky Bit.
To set the Sticky Bit using the letter method use the following command:
chmod +t
To set the Sticky Bit using the number method add a 1 to the front of the permission:
chmod 1744
Now that you understand how to change file and directory permissions let’s take a look at how to change
the owner of a file. The owner of the file is set when the file is created. The owner is usually the person
that created the file. There may be times when you want to change the owner of a file in order to give
someone else control of the file.
11.4.9.3.1 chown
The basic syntax for the chown command is chown <newuser> <filename> .
The chown command requires root permissions to work so you will have to use the sudo command.
In Figure 11-52 the ls -l command is used to examine the current owner, the chown command is used to
change the owner of myfile1 from matt to jsmith, and the ls -l command is used to verify the change.
When a user is created in Linux, a logon group with the user’s name is also created. This group has one
member, the user. Any files created by a user get the user’s logon group assigned as the group owner by
default. If you want to allow multiple users to have access to a file the best way is by using a group.
11.4.9.4.1 chgrp
To change the group owner of a file you use the chgrp command.
The basic syntax for the chgrp command is chgrp <newgroup> <filename>.
The chgrp command requires root permissions to work so you will have to use the sudo command.
In Figure 11-53 the ls -l command is used to examine the current group owner, the chgrp command is
used to change the group owner of myfile1 from matt to students, and the ls -l command is used to
verify the change.
Both the users matt and jsmith are members of the students group so both users will now will be able
to access the file even though jsmith is the owner.
It may be necessary to copy or move file and directories from time to time. The Linux command line
interface has several commands that can be used to copy or move file and directories.
11.4.10.1 cp
The cp command may require root permissions to work depending upon the permissions of the file so
you may have to use the sudo command.
In Figure 11-54 the ls command is used to list the current files, the cp command is used to copy myfile1
to myfile3 in the current directory, and the ls command is used to verify the file copy. In this example
the cp command is used to make a copy of the file with a new name.
Figure 11-54. cp to copy a file
In Figure 11-55 the cp command is used to copy myfile1 to the /tmp directory. The cd command is
used to change to the /tmp directory and the ls command is used to verify the file copy.
When using the cp command to copy a file to a different directory you can omit the filename in the new
location and the new file will have the same name as the original.
cp myfile /tmp/
You can give the new file a new name when copying it to a different directory.
cp myfile1 /tmp/myfile4
In Figure 11-56 the cp command is used to copy myfile1 to the /tmp directory and name the new file
myfile4. The cd command is used to change to the /tmp directory and the ls command is used to verify
the file copy.
Figure 11-56. cp to copy a file to another directory and change the filename
You can copy a file from one directory to another without being located in either directory by using
paths, either relative or absolute, in the cp command.
cp /tmp/myfile4 ~/myfolder/myfile5
In Figure 11-57 the cp command is used to copy /tmp/myfile4 to the myfolder directory in the home
folder, ~/ , and name the new file myfile5. The ls command is used to list the contents of ~/myfolder
without changing to the ~/myfolder directory. In this example the working directory was neither the
copy from nor the copy to location so relative and absolute paths had to be used with the cp command.
Absolute paths always start with the / character indicating the root directory and specify the absolute
location in the file system. The ~/ means the current user’s home directory.
Copying a directory requires the -r option, which means recursive. When copying a directory, the
actual directory, any files in the directory, and any other subdirectories and file in those subdirectories
need to be copied. The -r option makes the cp command examine the directory being copied and copy
all file and subdirectories.
cp -r myfolder /tmp
In Figure 11-58 the cp command is used to copy the myfolder directory directory to the /tmp directory.
The cd command is used to change to the /tmp/myfolder directory, and the ls command is used to
verify the cope was successful.
In this example the -r is required to copy the directory and all of the files in the directory.
11.4.10.2 mv
The mv command is used to move files and directories. The mv command can also be used to rename a
file.
The difference between the cp and mv commands is that the mv command creates a copy in the new
location and deletes the original file or directory while the cp command retains the original file or
directory.
In Figure 11-59 the ls -l command is used to examine the current directory, the mv command is used to
move myfile1 to the /tmp directory and retain the original filename, and the ls command is used to
verify that the file has been moved to the /tmp directory and that the file myfile1 no longer exists in the
current directory.
mv myfile1 /tmp
Figure 11-59. mv to move a file
In Figure 11-60 the mv command is used to move the myfolder directory from the /tmp directory to the
myfolder directory, ~/myfolder, and give it a new name mynewfolder. The ls -l command is used to
verify the files have been moved.
The mv command does not require any options to move the directory and files in the directory.
Figure 11-60. mv to move a directory
Finding files and directories in Linux is a fairly easy task. There are a couple of commands that can
assist you in finding what you are looking for.
11.4.11.1 find
The find command is one of the commands used to find files and directories in the Linux filesystem.
The basic syntax of the find command is find <starting directory> -name <filename>.
In Figure 11-61, the find command is used to find the file named myfile2 in the home directory, ~/.
There are several options to the find command that can be used to narrow the search for files.
The -mmin option, modified minutes, can be used to search for files that have recently been modified in
a specified number of minutes.
Figure 11-62 shows that there are 5 files named myfile2. One of the myfile2 files is modified using the
echo command to add text to the file thus changing the last modified date of the file. The find
command is then used to find the file named myfile2 that has been modified within the last 10 minutes.
The -10 after the -mmin option means in the last 10 minutes. The other time options for time would be
+10 for greater than 10 minutes and 10 for exactly 10 minutes.
Figure 11-62. Using the find command to find a file with the -mmin option
You can also search for files based upon the owner of the file using the -user option.
In Figure 11-63 there are 5 files named myfile2. The owner of one of the files is changed from matt to
jsmith using the chown command. The find command is used with the -user option to search for the
myfile2 file that is owned by jsmith.
Figure 11-63. Finding a file with the -user option
11.4.11.2 locate
Another way to find files in the Linux file system is using the locate command.
The locate command takes advantage of an index or database of all the files in the Linux filesystem so
the locate command can find files much faster than the find command.
In Figure 11-64 the locate command is used to find the file myfile2.
There is a major difference between the locate and find commands besides the speed. As mentioned
before, locate uses an index of files on the system, while find actually looks at all of the files in the
filesystem.
In Figure 11-65 the find and locate commands are used to look for the same filename, myfile2. The
find command finds 5 files named myfile2 while the locate command finds 2 files named myfile2. This
is because the index that locate uses to search for files has not been updated since the additional myfile2
files were created so the command cannot locate the files. Once the index is updated the locate
command will be able to locate the same number of files as find.
In Linux there are several ways to zip or compress files. This book will cover the most common
methods which are creating a tarball with the tar command, zipping files with zip, gzip, and bzip
commands, and unzipping files with gunzip, unzip, and tar.
11.4.12.1 tar
The tar command creates an archive, also known as a tarball, which is nothing more than taking a group
of files and putting them together in one file. You can also compress the archive using the bzip
command.
The basic syntax or the tar command is tar -<options> <archive name> <files to archive>.
In Figure 11-66 the tar command is used to create a tarball name mytarball of all files that start with
myfile and zip the archive with the bzip command. The options used with the tar command are -c
create an archive, -z compress, -v verbose , and -f filename of the archive. The resulting file is named
mytarball.tr.bz. The .tr indicates a tarball and the .bz indicates a file zipped by bzip.
Figure 11-66. Using tar and bzip to create a zipped tarball
11.4.12.2 gzip
When using the gzip command you just tell the command which files to zip. The basic syntax to zip a
single file is gzip <filename>.
In Figure 11-67 the gzip command is used to zip myfile1. The output file is named myfile1.gz and the
original file is no longer in the directory.
In Figure 11-68, the gzip command is used to zip myfile1 to myfile5. The output file is named
myfile.gz and the original files remain in the directory.
11.4.12.3 zip
The zip command can be used to zip files which can be shared with other operating systems.
Figure 11-69 shows the zip command being used to zip myfile1 to myfile5. The output file is
myfiles.zip.
11.4.12.4 gunzip
The gunzip command can be used to unzip files that end in .gz. The basic syntax of the gunzip
command is gunzip <archive>.
Figure 11-70 shows the gunzip command being used to unzip the archive myfile1.gz.
11.4.12.5 unzip
The unzip command can be used to unzip zip files that end in the .zip extension. The basic syntax of
the unzip command is unzip <archive>.
Figure 11-71 shows the unzip command being used to unzip the archive myfiles.zip. The files myfile1
to myfile5 are unzipped and the zip archive is still in the directory.
The tar command can be used to unzip zip files that end in .tar.bz. The basic syntax of the tar
command to unzip a file is tar -xvf <archive>.
Figure 11-73 shows the tar command being used to unzip the archive mytarball.tr.bz.
11.4.13 Links
In Linux links are like shortcuts for the command line but before we can discuss links we have to talk
about inodes.
11.4.13.1 Inodes
Each file in the Linux filesystem has an inode. Inodes store the basic information about a file in the
Linux filesystem. The following information is found in an inode for a file:
Did you notice something missing from the list? The filename is not part of the inode information. This
is because the filename is just a link to an inode.
The filename is associated with an inode in the directory. The inode points to the actually file contents.
A directory is nothing more than a file that lists the filenames and inodes associated with the directory.
You can view the inodes associated with a filename by using the ls command with the -i option.
Figure11-74 shows a listing of files with the inodes in the left hand column. The -l option was included
with the ls command to generate a long list. Each file has a unique inode.
It is possible to have a link to a file and have the link share the same inode as the original file. This
operates much like a shortcut in other operating systems. The hard link allows you to give the same
inode two or more names.
In Figure 11-75, the ln command is used to create a hard link to the myfile1 file named myfile1link.
Both myfile1 and myfile1link have the same inode number as seen using the ls -li command.
Figure 11-75. ln to create a hard link
If the original myfile1 file is deleted the file will still exist under the myfile1link name since both the
myfile1 and myfile1link pointed to the same inode.
In Figure 11-76, the myfile1 file is deleted. The myfile1link file contains the same contents since the
link pointed to the same inode.
Figure 11-76. Multiple file names with same inode
Another type of link is called a soft link. A soft link is truly like a file shortcut. A soft link does not
have the same inode as the original file. A soft link just points at the original file. If the original file is
deleted the soft link will no longer work.
In Figure 11-77 the ln command is used with the -s option to create a softlink to myfile1 named
myfile1softlink. When viewed with the ls -li command, the inodes are not the same, the file type is
listed as l for link, and there is a pointer myfile1softlink -> myfile1, that shows the links relation to the
original file.
Figure 11-77. Soft link
You can delete both hard and soft links using the rm command just like regular files.
Another difference between hard and soft links is that a soft link can be made to a directory but a hard
link cannot.
11.4.14 File information
Linux has several commands that can provide information about files and directories.
11.4.14.1 file
The file command is used test a file and find out what type of file it is.
In Figure 11-78 the file command is used to test three different files. The first file, myfile1 is an empty
file. The second file, myfile1softlink, is a symbolic link to myfile1. The third file, myfile2, contains
ASCII text.
Figure11-78. file to find the file type
11.4.14.2 stat
The stat command is used display filesystem information about a file such filename, size, number of
blocks used, inode, permissions, owner, group owner, last access date and time, last modify date and
time, and the last change date and time.
The Figure 11-79 shows the stat command is used to display the file system information about the file
myfile1.
User and groups are integral part of the access control system in Linux.
11.5.1 Users
On a Linux system, a user account is required in order to logon to the system. For the most part you will
be using a normal user account which is an account without any special privileges. Using a normal user
account for everyday system use is a good security practice.
When logged in as a normal user, your command prompt will end in a $ character by default. In Figure
11-80, the command prompt ends in a $ so this is most likely a normal user account.
On an Ubuntu Linux system, the root user does not have a password set and cannot be used until the root
user password is set. To set the root user password you have to have root level privileges.
11.5.3 sudo
As a normal user on a Linux system you need to have the ability to elevate your privileges to root level
to perform certain tasks, such as setting the root user password. The sudo command, which stands for
superuser do, will give you the root level permissions you need.
Not every user can use the sudo command. When you installed Ubuntu, the installation script asked you
to create a user which is automatically added to the proper group, sudo, to be able to use the sudo
command. More on groups later.
11.5.4 passwd
To change a user’s password you will need to use the passwd command. Notice that word is
abbreviated so the command is passwd not password.
In Figure 11-81, the passwd command is used with the sudo command to change the password of the
root user. The sudo command will first ask for the current user’s password for authentication and then
for the new password for the root user.
By default the sudo command remembers your password for 15 minutes so if you use the sudo
command several times in a row you will not have to enter your password each time.
11.5.5 su
Now that the root user password has been set you can logon as the root user. Instead of logging off and
on again you can use the su command which will put you into a root shell.
In Figure 11-82, the su command is used to access a root shell. You will be asked for the root password.
When you use sudo you are using your own password. When you use the su command to become root
you have to provide the root user’s password. You can tell that you are in the root shell by the #
character at the end of the command prompt and the word root at the front of the command prompt.
To exit the root shell back to your own shell you just use the exit command. In Figure 11-83, the exit
command is used to revert back to a user shell. Notice the change in the command prompt from # to $
and the username at the beginning of the command prompt.
The su command can also be used to switch to another user's shell. In Figure 11-84, the su command is
used to switch user shells. The password required is the password of the user you are switching to.
Since the new shell is a normal user shell the $ character does not change but the name at the front of the
command prompt does.
The passwd file holds the listing of all users on a Linux system. The passwd file is located in the /etc/
directory which is where all of the configuration files for a Linux system are located. Any user can look
at the contents of the passwd file as there are no actual passwords in the passwd file. In the past the
passwords were located in the passwd file but this was deemed a security risk so the passwords have
been moved to the shadow file. More on the shadow file later.
The passwd file contains more data than can be displayed on a single page in the command line. To
overcome this problem you can pipe the output of the cat command to another command that will allow
you to view one page at a time, either the more or less command. The | character is the pipe which
means take the output of the command before the pipe and send it to the command after the pipe. In the
example below the more command is used. You can also just use the more or less command in place of
cat for the same result. The syntax would be more <filename> or less <filename>.
In Figure 11-85, the /etc/passwd file is displayed with the cat and more commands.
The output of the passwd file, Figure 11-86, is described in the table, Figure 11-86, for the user jsmith.
Each of the columns is separated by the : character.
Figure 11-86. passwd file line
The second column used to be where the password was located but now just contains an X for every
users.
The third column is the User ID. The root user is always 0. The first created user is always 1000 and
each new users increments by 1 so the second user would be 1001. Between User ID 1 and 999 are
where the various system accounts are located that are created by the system during the system
installation or during the installation of a software package.
The fourth column is the Logon Group ID that the user is a member of. Each user is given their own
group and added to that group by default.
The fifth column is the comments sections and is normally blank by default and is usually used to hold
the user’s full name. The comments section will be covered later.
You can add users to the system by editing the passwd file directly but this method is not recommended.
The shadow file is where the actual user passwords are stored in an encrypted format.
The basic components of the shadow file are the username followed by the encrypted password
encrypted using a variation of the Data Encryption Standard (DES), followed by account information.
The shadow file can only be read by root or the system. Normal users cannot read the shadow file.
The other columns in the shadow file will be covered later.
The group file contains all of the groups on the system. Normal uses can view the group file.
The group file contains 4 columns: group name, group password, group id, group members. If there
is more than one group member, the user names are separated by a comma.
In Figure 11-88, the less command is used to view the group file.
less /etc/group
11.5.9 useradd
The useradd command is used to add users to a Linux system. The basic syntax of the useradd
command is useradd <options> <username>. One of the most common options with the useradd
command is -m which tells the useradd command to create the user’s home directory when creating the
account. Without a home directory, users will not be able to login to the system via the GUI. Command
line access is still permitted. Figure 11-89 shows the useradd being used to add a user named user1.
Figure 11-89. useradd
Figure 11-90 shows the line that is added to the passwd file after the execution of the useradd
command.
A user create with the useradd command will not have a password until it is set with the passwd
command.
11.5.10 userdel
The userdel command is used to delete users from a Linux system. The basic syntax of the userdel
command is userdel <options> <username>. The most common userdel option is -r which will
remove all of the user’s files and home directory.
In Figure 11-91, the userdel command is used with the -r option to delete user1. There is no mail
directory for user1 so the user1 mail spool not found error is displayed.
11.5.11 groupadd
The groupadd command is used to add groups to a Linux system. The basic syntax of the groupadd
command is groupadd <groupname>. In Figure 11-92, the groupadd command is used to add the
students group.
Figure 11-93 shows the line that is added to the group file by the groupadd command.
Figure 11-93. Line added to group file by useradd groupadd command
11.5.12 groupdel
The groupdel command is used to delete groups from the system. The basic syntax of the groupdel
command is groupdel <groupname>. In Figure 11-94, the groupdel command is used to delete the
students group.
11.5.13 usermod
The usermod command is used to modify the attributes of a user. The basic syntax of the usermod
command is usermod <options> <username>.
11.5.13.1 -c Comment
The -c option allows you to add a comment to the user profile. The information will be visible in the
/etc/passwd file, Figure 11-95. The comment section is normally used to hold the user’s full name
however anything can be put in this section.
Figure 11-96 shows the line that is modified in the passwd file after the execution of the usermod
command with the -c option.
Figure 11-96. Line modified in the passwd file by the usermod command
Comments can also be added to the user’s profile when the account is created with the useradd
command using -c option.
In Figure 11-97, the usermod command is used with the -d and -m options to move the user1 home
directory from /home/user1 to /home/newuser. Since the newuser directory did not exist it was
created automatically and the old user1 directory is deleted after all of the files are moved. The /etc/
passwd file is updated accordingly.
In Figure 11-98, the grep command is used to view the /etc/passwd file and extract the one line
associated with user1. The grep command is used to display lines matching a certain pattern or search
term. The passwd file can have many lines but the grep command can help you zero in on a specific
line by providing the matching pattern, in this case user1.
Figure 11-98. Line modified in the passwd file by the usermod command
By default, accounts are created with no expiration date. You can use the usermod command with the -
e option to set an expiration date. The date format is YYYY-MM-DD.
In Figure 11-99, the grep command is used to view user1 information. There is nothing set for the
expiration date.
The next 7 columns are shown in Figure 11-100. Any column that is blank means that nothing has been
defined. The Maximum Password Age is 99999 which means the password expires in 99999 days from
January 1, 1970.
In Figure 11-101, the usermod command is used with the -e option to set the account expiration date to
2016-10-01.
Figure 11-101. Set the expiration date with the usermod command
Figure 11-102 shows the result of the usermod command. Column 8 now 17075 which is the number of
days from January 1, 1970 until the expiration date. If you did the math it would turn out that this is
2016-10-01.
Figure 11-102. The result in the shadow file of setting the expiration date with the usermod command
The -f option defines the number of days after the password has expired until the account is disabled or
inactivated. This means that once a password has expired, the user will have the number of days defined
with the -f option to change their password. After the date has passed the user will no longer be able to
access the account until it is enable by the root user.
In Figure 11-103, the grep command is used to view the contents of the /etc/shadow file for user1.
There is nothing in column 7 which is the password inactivity column.
In Figure 11-104, the usermod command is used with the -f option to set the inactivity period to 7 days
for user1. Besides the number of days you can also use 0 to disabled the account as soon as the
password expires and -1 which disables the password inactivity feature.
Figure 11-104. Set the password inactivity limit with the usermod command
The output of the grep command in Figure 11-105 shows the number 7 in password inactivity column
which is column 7.
The -g option can be used to change the user’s initial Logon Group. By default each user is given their
own group named the same as their username and this is set as the user’s initial Logon Group. Any files
the user creates will have the initial Logon Group set as the group owner.
In Figure 11-106, the /etc/group file is viewed with the cat command to find the group number. The
output is piped to the tail command which shows the last 10 lines of the file. You can see from the
output that the user1 group number is 1001 and the students group number is 1002.
Figure 11-106. group file
Using the grep command to view the user1 line in the /etc/password file you can see that the initial
logon group, column 4, is set to 1001 which is the user1 group, Figure 11-107.
Using the ls -l command in the user1 home directory you can see that the files all have the user1 group
set as the group owner, Figure 11-108..
In Figure 11-109, the usermod command is used with the -g option to change the user1 initial Logon
Group to students.
Figure 11-109. Change the user’s logon group with usermod command
Using the grep command to view the user1 line in the /etc/password file you can see that the initial
logon group, column 4, is set to 1002 which is the students group, Figure 11-110.
Using the ls -l command in the user1 home directory you can see that the files all have the students
group set as the group owner, Figure 111.
Only files in the user’s home directory will automatically be updated with the new group. All files
outside of the user’s home directory will have to updated manually.
In Figure 11-112, the usermod command is used with the -G option to add jsmith to the group
instructors.
Using the grep command to search the /etc/group file for the instructors group shows that jsmith is
now a member of the group, Figure 11-113.
Figure 11-113. User added to supplemental group in group file
In Figure 11-114, the usermod command is used with the -G option to add jsmith to the group
athletics.
Using the tail command with the -n 5 option shows the last 5 lines of the /etc/group file. You can see
that jsmith is now part of the athletics group, however, is also no longer a part of the instructors group,
Figure 11-115.
When the -G option is used it will remove the user from all other groups unless the -a option is used to
append the group to the user’s profile.
In Figure 11-116, the usermod command is used with the -aG options to append the instructors group
to the user jsmith profile.
You can also use the -G option with the groups separated by a comma to add more than one group at a
time. There can not be a space before or after the comma.
In Figure 11-117, the usermod command with the -G option to add multiple groups to the user jsmith
profile.
The -l option can be used to rename a user. When the user is renamed the user's home directory does not
change. The basic syntax for the usermod command with the -l option is usermod -l <new username>
<old username>.
In Figure 11-119, the usermod command is used with the -L option to lock the account. The /etc/
shadow file is modified by putting a ! in front of the user's password to signify that the account is
locked.
In Figure 11-120, the usermod command is used with the -U option to unlock the account. The /etc/
shadow file is modified by removing the ! in front of the user's password.
The chage command is used to view and change the expiration settings for a user account. The basic
syntax for the chage command is chage <options> <account>.
11.5.14.1 -l List
The -l option is used to list the current settings for an account. The items in the list correspond to the
information in the /etc/shadow file following the user’s password. When viewed with the chage
command the settings are displayed in normal date format.
In Figure 11-121, the chage command is used to with the -l option view the settings for user1.
The -d option is used to change the last day since the user changed their password. This date will
automatically change when a user actually changes their password. If you want to extend or shorten the
amount of time a user can use their current password you can use this option. The date format for the -d
option is YYYY-MM-DD.
In Figure 11-122, the chage command is used to with the -d option to change the Last password change
date for user1 and then the -l option is used to verify the change.
The -E option is used to set the account expiration date for a user. The date format for the -E option is
YYYY-MM-DD.
In Figure 11-123, the chage command is used to with the -E option to set the Password expires date for
user1 and then the -l option is used to verify the change.
The -m option is used to set the minimum number of days between password changes. This setting will
prevent the user from changing their password frequently.
In Figure 11-124, the chage command is used to with the -m option to set the minimum number of days
between password changes for user1 and then the -l option is used to verify the change.
Figure 11-124. Change the minimum number of days between password changes with chage
The -M option is used to set the maximum number of days a password is valid. This setting will force
the user to change their password when the set number of days has passed.
In Figure 11-125, the chage command is used to with the -M option to set the maximum number of days
a password is valid for user1 and then the -l option is used to verify the change. When this option is set
the Password expires date is automatically calculated based upon the Last password change date.
Figure 11-125. Change the maximum number of days between password changes with chage
11.5.14.6 -I Inactive number of days after password expires account becomes inactive
The -I option is used to set the number of days following a password expiration date that an account
becomes inactive or disabled. The Password expiration date must be set with the -M option for this
option to take effect.
In Figure 11-126, the chage command is used to with the -I option to set the number of days following a
password expiration date that an account becomes inactive or disabled for user1 and then the -l option is
used to verify the change.
Figure 11-126. Change inactive date with chage
The -W option is used to set the number of days prior to the password expiring to warn the user. The
Password expiration date must be set with the -M option for this option to take effect.
In Figure 11-127, the chage command is used to with the -W option to set the number of days prior to
the password expiring to warn the user to 14 for user1 and then the -l option is used to verify the
change.
Running the chage command with no options, just a username, activates interactive mode. In interactive
mode, each settings is provided one at a time with the current or default settings in square brackets, [ ].
Pressing enter without entering any values will keep the default value in the brackets. Entering a value
will change the settings to the entered value. Once you have gone through all of the settings the account
is updated.
In Figure 11-128, the chage command is used without any options to enter interactive mode for user1
update the settings. The chage command with the -l option is used to verify the change.
Figure 11-128. chage interactive mode
12. Installing an Alternate Desktop
One of the great things about Linux is your ability to completely customize your desktop environment
which is one of the areas of Linux that has some great options for customization.
Ubuntu comes installed with the Unity Desktop by default but you are not stuck with one desktop
environment. You can install multiple desktop environments and switch back and forth between the
different environments as you desire.
While there are too many desktop environments to cover them all, I will discuss a few of the most
popular options.
The GNOME Shell is maintained by the GNOME Project, www.gnome.org. The current version is
GNOME 3.
Figure 12-1 shows Ubuntu with the GNOME Shell Desktop installed.
The GNOME Shell can be installed by opening a terminal and typing the following command:
You will be asked questions about the display manager. Keep the defaults.
Once installed you can select the desktop during the login process. Figure 12-2 shows the Ubuntu Login
screen. Above the password box and to the right is a small circle. Click on this circle to bring up the
different desktops once installed.
Figure 12-3 shows the desktop environment selection window. To select the GNOME Shell select
GNOME.
Figure 12-3. Select desktop environment
Figure 12-4 shows the login screen with GNOME Shell selected. The circle now has a foot icon in it
which is the GNOME Shell icon. You can now continue with the login process.
GNOME Flashback is a mode of GNOME provided by the GNOME Project which allows users who
prefer the way GNOME used to look to still have the ability to use GNOME. Of all the alternate
desktops this is my favorite and the one I use on my personal laptop.
Figure 12-5 shows Ubuntu with the GNOME Flashback Desktop installed.
The GNOME Session Flashback can be installed by opening a terminal and typing the following
command:
Once installed you can select the desktop during the logon process. Figure 12-6 shows the Ubuntu Login
screen with the additional desktop environment options.
GNOME Session Flashback comes with two options, Compiz and Metacity. Compiz is a windows
manager that is built for 3D hardware. If you have 3D hardware on your system Compiz will give you
extra functionality. If you do not have 3D hardware choose Metacity. I always choose Metacity.
Figure 12-6. Select desktop environment
12.3 KDE
Canonical maintains a separate version of Ubuntu built on the KDE Desktop named Kubuntu. You can
either download and install Kubuntu or you can add all of the KDE Desktop packages to your existing
Ubuntu system using the following command:
12.4 Xfce
Xfce is a lightweight desktop for use on systems that may not have many resources. The Xfce project
can be found at www.xfce.org.
Canonical maintains a separate version of Ubuntu built on the Xfce Desktop named Xubuntu. You can
either download and install Xubuntu or you can add all of the Xcfe Desktop packages to your existing
Ubuntu system using the following command:
Figure 12-10 shows the Desktop environment menu with Xcfe selected.

Figure 12-10. Select desktop environment
12.5 Cinnamon
The Cinnamon Desktop was developed as a branch or fork of the GNOME Shell for Linux Mint,
another Linux distribution based off of Ubuntu.
You can install the Cinnamon Desktop packages to your existing Ubuntu system using the following
command:
Linux is a very stable operating system but every once in awhile something will go wrong and you will
need to fix something.
Since Ubuntu is mainly a graphical environment, if the graphical user interfaces fails to start then you
may not be able to fix any problems. To aid in the recovery of a broken Ubuntu system, Ubuntu has a
recovery mode.
To enter recovery mode you have to press the right shift key while booting your system.
Figure 13-1 shows the GRUB bootloader menu that will appear. GRUB is the default bootloader for
Ubuntu.
There are several options but it is the first two that are the most important.
The first option, Ubuntu, will proceed with a normal boot into the graphical user interface.
The second option, Advanced option for Ubuntu, is for system recovery.
Choosing recover mode will lead you to Figure 13-3, the Recovery Menu.
There are several options in the Recovery Menu but the one we are most interested in is root which will
give you a terminal with root privileges.
Figure 13-3. Recovery menu
Having root privileges at a terminal can be a very dangerous thing so by default the recovery mode boots
into a read only mode meaning that changes can not be made to the operating system. To make any
changes you will need to mount the filesystem in read/write mode using the following command:
mount -o remount,rw /
Once the command above has been run you will have full control of the operating system. What to do
next is outside the scope of this book so if you do not know what you are doing I would recommend
staying out of the recovery mode until you have more experience.
14. Manual Disk Provisioning
During the installation process you will be given the option to manually partition the disk yourself,
Figure 14-1. While this is an advanced topic I wanted to show you some of the basics of manual disk
partitioning.
To manually partition the disk select Something else and click Continue, Figure 14-1.
Figure 14-2 shows the disk partitioning window. If this is a fresh install on a new disk there will be no
partitions present. The only thing that will be present is the disk device /dev/sda. The disk device is
located in the /dev or device directory. The sd in sda stands for SCSI device which is a disk type which
also covers USB and SATA devices. If the drive was an IDE drive it would be hda instead of sda. The
a in sda signifies the first device. The second device would be sdb and the third device would be sbc.
To create a new partition, select the /dev/sda device and click New Partition Table in the lower right
hand corner.
Figure 14-2. New Partition Table
You will have to confirm your choice to create a new partition by clicking Continue, Figure 14-3.
Once the partition table is created, you will see the new partition table with the label free space, Figure
14-4. The size of the free space will depend upon the size of the disk.
You will now need to create the partitions by clicking the + in the lower left hand corner.
Figure 14-3. Free Space
Swap space on a Linux system is part of the virtual memory system that is is made up of the physical
memory and the swap space. Swap space requires its own partition on a Linux system.
The size of the swap space is determined by the amount of RAM on your system. At a minimum you
should have as much swap space as you do physical memory if you are not using hibernation and 2x the
amount of RAM is you are using hibernation. This only works up to a point, however, as once you get
over 1 or 2 GB of RAM, adding too much swap space does not increase performance. For example my
laptop has 16GB of RAM and only 3 GB of swap space which almost never gets used.
To configure your swap space you will need to set the size, type of partition, in this case Primary, the
location of the partition, in this case at the Beginning of the free space, and then select Use as swap
area, Figure 14-4. Once all of the parameters are set click OK.
Figure 14-4. Configure Swap Space
On the partition window you will now see the swap space and the free space, Figure 14-5. In Figure
14-5, the swap space location is listed as /dev/sda1, with the 1 standing for the 1st partition of sda.
Figure 14-5. Swap Space /dev/sda1
The next partition that should be installed is the root partition. The root partition is the root of the
Linux file system. An explanation of the Linux file system can be found in Chapter 11.
To install the root partition, select the free space and click the + in the bottom left hand corner.
Figure 14-6. Add root partition
The root partition needs to be large as this is where most of the operating system is located. In Figure
14-7, the root partition is assigned 6GB. Since the swap partition was the Primary partition, the root
partition will be a Logical partition. You should set the partition to be located at the Beginning of this
space and select Use as Ext4 journaling file system. Finally you need to select a mount point. For the
root partition the mount point is / which is the root of the file system.
Figure 14-7. root partition parameters
When manually partitioning your disk, you can define many other partitions other than swap and root,
Figure 14-8.
Figure 14-8. other partition mount points
The following are a list of the other mount points and their uses. If you do not define a mount point, the
directory will automatically be created under the root partition.
/boot - Holds the system startup files and the system kernel, vmlinuz.
/home - Holds the home directories for system users.
/tmp - Holds temporary files.
/usr - Holds all of the user programs, libraries, and documentation.
/var - Holds variable data such as system logs.
/srv - Holds data on services provided by the system.
/opt - Holds third party software.
/usr/local - Holds locally installed programs.
In Figure 14-9, the swap, root, and home partitions have been configured.
Once you have configured the partitions you want to define, click Install Now.
Figure 14-9.swap, root, and home partitions configured
Before the install begins you will have to confirm that you want to write the changes to the disk by
clicking Continue Figure 14-10.
Figure 14-10. Continue
Final Thoughts
I would like to thank all of my readers for purchasing this book and giving me a chance. I hope that you
found what you were looking for.
Please keep your eyes open for my future Linux and Network Security books.
About the Author
Matt Vogel works in the field of and teaches Network Security. He is a dedicated Linux user and uses
Linux in his Network Security classes. He lives in Virginia Beach, Virginia where he works for the
government.