Linux Mint System Administrator's Beginner's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Table of Contents Linux Mint System Administrator's Beginner's Guide Credits About the Author About the Reviewers www.PacktPub.com Support files, eBooks, discount offers and more Why Subscribe? Free Access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Time for action – heading What just happened? Have a go hero – heading Reader feedback Customer support Errata Piracy Questions 1. Introduction to Linux Mint Overview A bit of history Open source project Contributing to the project Why Linux Mint is different Editions Summary References 2. Installing Linux Mint Creating a bootable Linux Mint USB flash drive Time for action – downloading and burning the ISO image What just happened? Installing Linux Mint from a flash drive Time for action – booting and installing Linux Mint What just happened? Booting Linux Mint Time for action – booting Linux Mint for the first time What just happened? Summary 3. Basic Shell What's a shell? Where are you? Time for action – learning pwd and cd commands What just happened? Have a go hero – using a shortcut for accessing your home directory Running commands Time for action – launching a program from the command line What just happened? Have a go hero – executing programs without using the full path Search commands Time for action – using the which command What just happened? Listing, examining, and finding files Time for action – using the ls, locate, find, and cat commands What just happened? Have a go hero – getting more information when listing files Pipelines and redirection Time for action – using pipelines and redirection by applying different commands What just happened? Have a go hero – appending content to a file using redirection Setting environment variables Time for action – setting the PATH environment variable What just happened? Have a go hero – learning the export command Displaying command history Time for action – using the history command What just happened? Have a go hero – checking the history of executed commands Creating your first shell script Time for action – creating and executing a shell script What just happened? Have a go hero – learning advanced shell programming How to get help Time for action – using the man and the info commands What just happened? Summary 4. Account Provisioning Who am I? Time for action – finding out the current user What just happened? Becoming the root user Time for action – using the sudo command to become the root user What just happened? Have a go hero – executing the whoami command after becoming the root user Changing password Time for action – changing the password for a user What just happened? Have a go hero – using passwd command Adding a new user Time for action – changing the password for a user What just happened? Have a go hero – try to delete a user Adding a new group Time for action – creating a new group called develop What just happened? Have a go hero – try to delete a group Adding a user to a group Time for action – adding the user luke to the develop group What just happened? Changing user privileges Time for action – granting permissions to a user for monitoring system logs What just happened? Have a go hero – using command line for changing permissions Summary 5. Installing, Removing, and Upgrading Software Installing software Time for action – installing AbiWord word processor What just happened? Have a go hero – discovering software provided by Linux Mint Removing software Time for action – removing the AbiWord program What just happened? Upgrading software Time for action – upgrading software through the Update Manager tool What just happened? Have a go hero – finding out how to change preferences in Update Manager Summary 6. Configuring hardware Detecting hardware Time for action – how to display the device information What just happened? Have a go hero – using the dmesg, lspci, and lsusb commands Configuring your monitor Time for action – changing the screen resolution What just happened? Configuring a keyboard Time for action – adding a new layout What just happened? Configuring your mouse Time for action – changing mouse orientation What just happened? Configuring sound Time for action – how to enable window and button sound What just happened? Installing additional drivers Summary 7. Networking Configuring a wired network Time for action – configuring your connection What just happened? Have a go hero – changing the hostname Configuring the wireless network Time for action – how to connect your computer to a wireless network What just happened? Accessing a Windows-shared folder Time for action – how to access a specific shared folder What just happened? Connecting to servers Time for action – connecting to an FTP server What just happened? Have a go hero – connecting to a server using the secure WebDAV protocol Summary 8. Storage and Backup Filesystem types Disk quotas Time for action – assigning disk quota to a specific user What just happened? Have a go hero – scheduling quota checking Disk usage analysis Time for action – examining disk usage What just happened? Creating backups Time for action – making a backup of a specific folder What just happened? Have a go hero – creating and restoring a backup file Restoring backups Time for action – restoring a backup folder What just happened? Have a go hero – create backup for applications Summary 9. Security Running an SSH server Time for action – installing and configuring an SSH server What just happened? Installing an anti-virus software Time for action – installing Clam-AV anti-virus What just happened? Configuring a firewall Time for action – how to configure a simple firewall What just happened? Have a go hero – disabling firewall on startup using the command line Using a security module for the kernel Time for action – installing AppArmor What just happened? Managing your password safely Time for action – installing and using KeePass What just happened? Building a security checklist Summary 10. Monitoring Your System Processes and services Starting and stopping services Time for action – stopping and starting an SSH daemon What just happened? Have a go hero – checking current status of all services Activating services Time for action – activating Samba What just happened? Listing the running processes Time for action – list the processes running on our machine What just happened? Displaying CPU, memory, and network usage Time for action – Displaying resources information in real time What just happened? Have a go hero – getting information about filesystems usage Summary 11. Troubleshooting Hardware Time for action – checking memory, CPU, USB, and PCI devices What just happened? Checking log files Time for action – listing the last five lines of the syslog file What just happened? Kernel Time for action – using lsmod, modprobe, and dmesg commands What just happened? Networking Time for action – checking who is listening on what port What just happened? Processes and filesystems Time for action – finding a specific process What just happened? Summary Index Linux Mint System Administrator's Beginner's Guide Linux Mint System Administrator's Beginner's Guide Copyright © 2012 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: December 2012 Production Reference: 1181212 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK ISBN 978-1-84951-960-1 www.packtpub.com Cover Image by Asher Wishkerman (<[email protected]>) Credits Author Arturo Fernandez Montoro Reviewers Antonio Hernández Díaz Dennis Schwertel Acquisition Editor Joanna Finchen Commissioning Editor Ameya Sawant Technical Editors Vrinda Amberkar Dennis John Dominic Pereira Copy Editors Insiya Morbiwala Aditya Nair Laxmi Subramanian Project Coordinator Esha Thakker Proofreader Clyde Jenkins Indexer Hemangini Bari Graphics Melwyn D'sa Production Coordinator Melwyn D'sa Cover Work Melwyn D'sa About the Author Arturo Fernandez Montoro is a Software Architect specializing in design, development, testing, and deployment of high-traffic web applications. Since 2002, he has been writing on Linux and Open Source technologies for different printed and online magazines, such as Todo Linux, Linux+, Linux Magazine, and Free Software Magazine. Also, he has authored iPhone JavaScript Cookbook for Packt Publishing. His professional experience includes working in technologies, such as Django, Ruby on Rails, J2EE, PHP, web application servers, relational and NoSQL databases, JavaScript, HTML5, and CSS. He spent the last 3 years working as a Software Architect and Python/Django Lead Developer. Currently, Arturo lives in Madrid working as a Software Architect for QDQ Media, one of the biggest online marketing agency in Spain. He can be reached at <[email protected]>. A very big thanks to the Linux Mint developers for developing one of the most amazing GNU/Linux distributions in the world. Millions of users enjoy Mint every day. Thanks for making my daily job easier. Many thanks to my parents, who've always supported me in difficult times. They taught me to never give up. Finally, I really appreciate all the work done by the team at Packt Publishing, thanks a lot for helping me publish this book.