Philip Kirkbride
Basic Linux Terminal Tips and Tricks
Learn to Work Quickly on the Command Line
1st ed.
Philip Kirkbride
Montreal, QC, Canada
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/9781484260340 . For more detailed information, please visit http://www.apress.com/source-code .
ISBN 978-1-4842-6034-0 e-ISBN 978-1-4842-6035-7
https://doi.org/10.1007/978-1-4842-6035-7
Philip Kirkbride 2020
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Dedicated to the open source community.
Introduction
Despite graphics being more advanced than ever, the Linux terminal, or command line, continues to be one of the most useful tools for software developers, system admins, and IT professionals to know. From the terminal, complex tasks can be launched in a few words, when the equivalent action would take several steps in a GUI. In other cases, things which can be done from the command line are simply not possible from the GUI of an operating system.
In a world where many devices are embracing mobile-style interfaces which limit users, the power of the Linux terminal can feel freeing. It gives you fine-grained control of your system and the tasks you run. The only requirement is that you learn the magic words that will manifest what you want to happen. This book is for those who want to learn about the Linux terminal, bash, and terminal-based utilities.
Much of what youll read here is applicable in many places due to the ubiquity of Linux. Whether it be your desktop OS, a remote server running a website, or physical hardware, if its running Linux, you can access the command line.
Acknowledgments
I'd like to thank the open source community and the developers of utilities explored in this book. Most of the ideas and techniques shared here have been learned with the help of the many developers online always willing to help with small and large problems. A number of people have contributed feedback and suggestions including Jason, Omm, and various users from the Unix SE and Telegram. Id also like to acknowledge my grandfather Douglas Kirkbride for encouraging my early interest in computers, my parents, family, friends Colin, Matt, my thesis advisor Dr. Fuhua (Oscar) Lin, and the tech community in Waterloo, Ontario (Communitech, BlackBerry, ect.) where I was able to meet many talented people like Taylor Brynes who introduced me to SSH and Qbo who increased my expectations of what a quality user experience is. As well as Jasmine Samaras whose antics kept me entertained during the process of writing this book.
I'd also like to thank the editors at Apress Louise Corrigan, Nancy Chen, and James Markham for helping to mold the idea into a book as well as the technical reviewer David Both who has provided great feedback and adjustments.
Table of Contents
About the Author
Philip Kirkbride
has been developing software for over 10 years. After college he worked as a contractor developing websites and mobile apps in Southern Ontario, Canada. He has since worked at several software and hardware startups and contributed to open source projects. He is currently a research assistant on Dr. Fuhua (Oscar) Lins Adaptive Cyberlearning research team, creating educational software used in COMP 272 Data Structures and Algorithms and COMP 372 Design and Analysis of Algorithms at Athabasca University. He is also a mentor for Mannings short course Use Machine Learning to Detect Phishing Websites and co-author of 2 books on JavaScript, Professional JavaScript (Packt, 2019), and The JavaScript Workshop (Packt, 2019). When he is not working or learning new things, he enjoys spending time outdoors. He can be reached at kirkins@gmail.com.
About the Technical Reviewer
David Both
is an Open Source Software and GNU/Linux advocate, trainer, writer, and speaker. He has been working with Linux and Open Source Software for more than 20 years and has been working with computers for over 45 years. He is a strong proponent of and evangelist for the "Linux Philosophy for System Administrators." David has been in the IT industry for over 40 years. He is the author of The Linux Philosophy for SysAdmins (Apress, 2018) and the three-volume set, Using and Administering Linux (Apress, 2019).
Philip Kirkbride 2020
P. Kirkbride Basic Linux Terminal Tips and Tricks https://doi.org/10.1007/978-1-4842-6035-7_1
1. Linux Primer
Most people growing up today are introduced to computers through a graphical interface, whether it be through a video game console, a laptop, or an iPad. For most peoples interactions with computers are done through a graphical interface of some sort. Despite the popularity of graphical interfaces , most serious programming and system administration are still done at the command-line level.
Graphics keep getting better. Innovations like voice-activated computing, wearables, and IoT are introducing even more ways to interact with computers. New versions of popular operating systems on both desktop and mobile are constantly changing. Yet it seems underneath most of these new systems from IoT to Android, there is a command-line world that exists in a stable state while everything built on top changes.