Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. #Setting up your system, and basic bash
  2. Linux is a form of Unix. This document will focus more on the "bash shell."
  3.  
  4. Most modern Linux distributions have a "desktop" interface that looks something like Microsoft Windows.
  5. Some of these desktops, like Cinnamon and Mate look vaguely like Windows 7. Others like Unity look more like Windows 8 or Windows 10.
  6.  
  7. I will be focusing mostly on the "bash shell." The shell is basically a command line
  8. interface. It uses the keyboard. You bring it up in a "terminal window." It is often called "term." Term is only mildly aquainted with the mouse so most interactions happen on the keyboard.
  9.  
  10. The shell has grown over the years. Now most modern systems use the "Bash Shell." Macintosh also uses the Bash shell. Microsoft has announced that it will be releasing the Bash shell for windows as well. It is worth learning as much as possible about the bash shell if you are in IT.
  11.  
  12. ## Users
  13.  
  14. In unix systems there are ordinary users and a root user. Ubuntu and its derivatives do not allow you to log in as root. You probably should not log in as root, even if your system allows it.
  15.  
  16. As a regular user you can't do administrative things like install software or printers. If you want to do that type of administrative task you have to temporarily promote yourself to "Super User" status. Root is a super user. We use the sudo command to do that.
  17.  
  18. ### Updating Linux
  19. A priority on a linux a new linux system should be to install any updates or upgrades. Do not do this step on a Mac, because it has other mechanisms for updating.
  20.  
  21. Do the following commands. You should be prompted for a password after the first step.
  22.  
  23. sudo apt -y update
  24. sudo apt -y upgrade
  25.  
  26. Some systems like linuxmint have their own built-in update system. I like to make updates automatic. Type the following command.
  27.  
  28. sudo crontab -e
  29.  
  30. The first time this runs it will ask you for an editor. I suggest "nano" if you are new to Linux
  31.  
  32. If you have a wall of text appear after selecting nano, scroll to the bottom. However it is also possible the crontab will be empty. Add the following to the bottom of the text if there is any.
  33.  
  34. 5 4,16 * * * apt -y update
  35. 19 5,17 * * * apt -y upgrade
  36.  
  37. Save the file using the menu at the bottom of the screen. ^ means the "Ctrl" key. You save the file with ^W (hold Ctrl and press W). ^X should exit
  38.  
  39. What this will do is run the update program automatically at 4:05 AM and 4:05 PM. The upgrae will be attempted at 5:19 AM and PM. You can adjust these commands to your lifestyle.
  40.  
  41. Some people do not like to blindly install updates. This is especially true of production systems. But for ordinary users I think automatica updates are safer in the long run.
  42.  
  43. ### Installing Terminator
  44. I prefer the "terminator" program rather than just term. We will still be using the bash shell. It will just be in a somewhat more friendly term program.
  45.  
  46. If you are using a debian-style distribution (like Debian, Ubuntu, or LinuxMint) type the following command. If you are using an rpm based distribution like Fedora or Cent-OS, use "yum" or "dnf" instead of "apt."
  47.  
  48. sudo apt install terminator
  49.  
  50. The system should ask for a password. A whole lot of stuff should go on.
  51.  
  52. Type "exit" at the bash prompt to close the term program. Now use your desktop to open the terminator program.
  53.  
  54. #### Cowsay
  55.  
  56. We will use the "cowsay" program to do some basic testing and exploring. Type the following command
  57.  
  58. cowsay 'Hello'
  59.  
  60. If cowsay is installed on your system, you should be rewarded. If cowsay is not installed do "sudo apt install cowsay" and try getting the cow to say hello.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement