Saturday, April 28, 2018

Week 7: Chapter 14: Installing Software

John George Bauer-Buis
2018-04-28
NET-140-001N

This first section is a synopsis of the chapters using the headings and subheadings from the textbook, with descriptions in my own words.
 

Chapter 14: Installing Software
    •    On GNU/Linux systems, software is normally ultimately installed using a package manager, whether it is controlled directly through the command line or indirectly through a graphical user interface.  Package managers will install dependencies, other packages required to use a package, if they are not already present.  Package managers keep track of what versions of what packages are actually installed, along with which files belong to which package.  You need to have administrator privileges to install, upgrade or remove software.  This is normally accomplished with the su or sudo commands, which require typing retyping your password if you have the appropriate privileges first, for security reasons.
    •    RPM-Based Distributions (Red Hat Derived), such as Red Hat Enterprise Linux, Fedora, Yellow Dog (https://distrowatch.com/table.php?distribution=yellowdog), etc. use rpm or yum to manage packages. 
    •    DEB-Based Distributions, such as Debian (which originated this package format), Ubuntu  and its variants, and many other distributions, including some Puppy Linux variants, use the Advanced Packaging Tool, or APT, as well as aptitude, which is designed to be more user friendly (https://askubuntu.com/questions/347898/whats-difference-of-apt-get-and-aptitude).  These distributions also can access the package manager directly through dpkg. 
    •    Both yum and apt use a similar, more human-readable and user-friendly syntax for commands, while rpm and dpkg are more terse and opaque. 


Observations:
I have manually installed things using apt or aptitude before, such as Spotify, rEFInd (a boot manager for EFI systems) and the official Google Chrome, as well as Steam.  I believe dpkg also has a GUI, although so far I don’t think I’ve used it more than once or twice.  I usually use the *Ubuntu store to install things if possible, since it is easy to search for software in it.

https://www.syncfusion.com/ebooks/linux

I may add to this post at a later date if I discover more useful information that I think I should feature here.

Sunday, April 15, 2018

Week 6: Chapter 10 and 11

John George Bauer-Buis
2018-04-15
NET-140-001N

This first section is a synopsis of the chapters using the headings and subheadings from the textbook, with descriptions in my own words.

Chapter 10: I/O Redirection
There are three standardized streams for input and output (I/O): standard input (stdin), standard output (stdout), and standard error (stderr, which is a special output stream).  (They are also used in C/C++ programming, so they are familiar to Windows programmers from there.) Streams are assigned file descriptors: input is 0, output is one, and error is 2.  They each represent open files to make it possible to interact with them in the same way as files, reading from them and writing to them.  They can be redirected to be used as input or output for each other in as well, just like other programs.
Control d or Ctrl-d is the command to produce an End-Of-FIle (EOF) marker, if one is not present. This is important when ending something sourced from stdin, which doesn’t normally add one by default.
Chapter 11: Additional Command Line Concepts
    •    Aliases can be used to shorten repeated commands, or make more memorable names for commands.  An alias is only temporary unless it is added to a user’s personal initialization files.
    •    Personal Initialization Files can be used to customize the shell when logging in, and are placed in ~/.bashrc or ~/.bash_profile. They are obtained by the shell using the source command, which both reads and executes them.
    •    Shell History will save previous commands, which are written to the file ~/.bash_history, with a default size of 500.  The history command will display the commands saved in the shell history, and giving it a number (history N) as an argument will repeat the command from that line in the file, I have found that if the value is too large it is ignored. The command !! will repeat the previous command, the command !N with N being a numerical argument can be substituted for history N as well.  The command !characters or history characters will run the last command with those characters in the shell history.  The shell history can be searched with control r (Ctrl-r), which lets the user search through commands by typing some characters.  As is usual in the *NIX CLI, pressing Enter runs the command, and Control c (Ctrl-c) is used to quit without doing anything.
    •    Tab Completion is somewhat obvious, in that pressing the Tab key attempts to complete an incomplete command (not order a carbonated drink for you as Homer Simpson thinks).  In the case of multiple possibilities, pressing the tab key again will show them all.  This also works for the names of files and directories, which is quite convenient.
    •    Line Continuation is achieved by using the backslash (\) at the end of the line to extend it onwards.  The greater than symbol (>) is used to show this in the CLI so the user is aware that the line is being continued.

I may add to this post at a later date if I discover more useful information that I think I should feature here.