A.5.1. Linux Programming and the GNU Toolchain

A.5.1. Linux Programming and the GNU Toolchain

Making the Transition to Linux A Guide to the Linux Command Line Interface for Students Joshua Glatt Making the Transition to Linux: A Guide to the Linux Command Line Interface for Students Joshua Glatt Copyright © 2008 Joshua Glatt Revision History Revision 1.31 14 Sept 2008 jg Various small but useful changes, preparing to revise section on vi Revision 1.30 10 Sept 2008 jg Revised further reading and suggestions, other revisions Revision 1.20 27 Aug 2008 jg Revised first chapter, other revisions Revision 1.10 20 Aug 2008 jg First major revision Revision 1.00 11 Aug 2008 jg First official release (w00t) Revision 0.95 06 Aug 2008 jg Second beta release Revision 0.90 01 Aug 2008 jg First beta release License This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License [http:// creativecommons.org/licenses/by-nc-sa/3.0/us/]. Legal Notice This document is distributed in the hope that it will be useful, but it is provided “as is” without express or implied warranty of any kind; without even the implied warranties of merchantability or fitness for a particular purpose. Although the author makes every effort to make this document as complete and as accurate as possible, the author assumes no responsibility for errors or omissions, nor does the author assume any liability whatsoever for incidental or consequential damages in connection with or arising out of the use of the information contained in this document. The author provides links to external websites for informational purposes only and is not responsible for the content of those websites. The inclusion of a link to an external website from anywhere in this document does not imply an endorsement of that site nor of the information, products, or services offered there. Trademarks Linux is a registered trademark of Linus Torvalds. Microsoft and Windows are registered trademarks of Microsoft Corporation. Mac OS is a registered trademark of Apple Inc. UNIX is a registered trademark of The Open Group. Google is a trademark of Google Inc. Wikipedia is a registered trademark of the Wikimedia Foundation, Inc. Eclipse is a trademark of the Eclipse Foundation, Inc. GNOME is a trademark of the GNOME Foundation. KDE and K Desktop Environment are trademarks of KDE e.V. O'Reilly is a registered trademark of O'Reilly Media, Inc. All other trademarks and registered trademarks are the property of their respective owners. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Table of Contents Introduction ................................................................................................................... vii 1. What is this guide for? ....................................................................................... vii 2. Who would want to read this guide? ................................................................... vii 3. Who would not want to read this guide? ............................................................. vii 4. What is the reader expected to know? ................................................................. vii 5. What does the reader need? ............................................................................... viii 6. What does this guide cover? .............................................................................. viii 7. What does this guide not cover? ........................................................................ viii 8. Other information about this guide .................................................................... viii 9. Conventions used in this guide ............................................................................ ix 10. Structure of this guide ....................................................................................... ix 11. Suggestions for using this guide ......................................................................... x 1. Getting started with Linux ........................................................................................... 1 1.1. User interfaces in Linux: graphical and command line ......................................... 1 1.2. Graphical user interfaces (GUIs) for Linux ......................................................... 1 1.3. Accessing the Linux CLI through a GUI's terminal window ................................. 2 1.4. Shells, the shell prompt, and your home directory ............................................... 2 1.5. Key differences between Windows/Mac OS X and Linux .................................... 3 1.6. Understanding the tables of commands and options ............................................. 4 2. Built-in help system ..................................................................................................... 5 2.1. Manual ("man") pages ....................................................................................... 5 2.2. GNU info pages ................................................................................................ 5 3. Basic shell commands and related utilities .................................................................... 6 3.1. Features of the shell .......................................................................................... 6 3.2. Navigating the file system ................................................................................. 7 3.3. Manipulating the file system .............................................................................. 9 3.4. Handling compressed files (tarballs) ................................................................. 11 3.5. Working with text streams ............................................................................... 11 3.6. Using job control (partial coverage) ................................................................. 13 4. SSH (secure) file transfer (SFTP) ............................................................................... 15 5. Text editors ............................................................................................................... 18 5.1. vi ................................................................................................................... 18 5.2. GNU Emacs ................................................................................................... 18 6. Programming tools ..................................................................................................... 23 6.1. Compiling programs ........................................................................................ 23 6.2. Running programs ........................................................................................... 24 6.3. Debugging programs ....................................................................................... 25 6.4. Inspecting and modifying programs .................................................................. 27 A. Further reading ......................................................................................................... 29 A.1. Suggested resources for finding information ..................................................... 29 A.2. More on Linux ............................................................................................... 29 A.2.1. General Linux resources ....................................................................... 29 A.2.2. Linux file system ................................................................................. 30 A.3. More on the shell and related utilities .............................................................. 30 A.3.1. General information on the Bash shell ................................................... 30 A.3.2. Changing your shell temporarily to Bash ............................................... 31 iii Making the Transition to Linux A.3.3. Text processing with the shell .............................................................. 31 A.3.4. Shell scripting (using Bash) .................................................................. 32 A.3.5. The GNU Core Utilities (coreutils) ....................................................... 32 A.4. More on text editors ....................................................................................... 32 A.4.1. More on vi .......................................................................................... 32 A.4.2. More on GNU Emacs .......................................................................... 33 A.5. More on programming on Linux machines ....................................................... 33 A.5.1. Linux programming and the GNU toolchain .......................................... 33 A.5.2. More on GCC ..................................................................................... 34 A.5.3. GNU Make and Makefiles ................................................................... 34 A.5.4. More on GDB ..................................................................................... 34 A.5.5. More on the GNU Binary Utilities (binutils) .......................................... 35 B. Graphical alternatives ................................................................................................ 36 B.1. GUI-based file managers ................................................................................. 36 B.2. GUI-based file transfer programs ..................................................................... 36 B.3. GUI-based text editors .................................................................................... 36 B.3.1. GUI-based vi and Emacs

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    49 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us