Distros
Ubuntubased on debian
xxxx
xxxx
xxxx
xxxx


Technologies
Index
DNS
Daemons
Samba


Linux
Linux Notes
DistroTest
Linux Commands
debian
aptitude apt dpkg(lowlevel)
apt-get update
apt-get upgrade
apt-get install vim
centos
yum rpm(lowlevel)
yum update
yum install vim
opensuse
zypper yast rpm(lowlevel)
zypper update
zypper in vim


Linux Applications
\Ansible
Apache
ApacheHadoop
ethtool
OpenSSH Server
PHP
SFTP
UFW - Uncomplicated Firewall
vim
vi, found on all* unix and linux distributions
vsftpd - Very Secure FTP Daemon


Linux File Structure
/bin/falseprevents user from logging in when set as default shell
binEssential User Binaries(programs). Firefox & bash are stored here.
bootStatic Boot Files
cdromLegacy Mount Point CDROM
devDevice Files
etc/
/etc/
Configuration Files - this directory contains most of the config files for Linux Distributions
/etc/apache2ServerRoot file
/etc/hostsEntries in the hosts file have the following format:
IPAddress DomainName [DomainAliases]
/etc/apache2/apache2.confApache Config Files
/etc/apache2/ports.confApache Config Files
/etc/apache2/sites-available/defaultDefault VHost Config
/etc/apache2/sites-enabled/000-defaultDefault VHost Config
/etc/apache2/
/etc/network/interfaces/set permant IP address ens33
/etc/bind/named.conf/Main BIND9 configuration file
homeHome Folders
libEssential Shared Libraries
lost+foundRecovered Files
mediaRemovable Media
mntTemporary Mount Points
optOptional Packages
procKernel & Process Files
rootRoot Home Directory
runApplication State Files
sbinSystem Administration Binaries
selinuxSELinux Virtual File System
srvService Data
syssys
tmpTemporary Files
usrUser Binaries & Read-Only Data
varVariable Data Files /var/log/syslog (The system log file Ubuntu)
Back to index


Midterm Prep
Ch 1
Max memory addressable with 32-bit processor~4GB
What three partitions do many users benefit by creating for an ubutut desktop install?/root, /home, /boot
What is the recommended size of the SWAP partition?1.5 to 2x times the installed RAM
What new firmware is known to cause an issue with another operating system system other than the default that the defaul that cam with the machine?UEFI
What is Unix Time?seconds elapsed since January 1st 1970
Ch 2
A display manager is used tologin graphically
chose a different window manager
use productitivity applications
use configuration tools
set different runlevels
Runlevel 0Halt
What is ubuntu desktop window managerUnity
primary location for he xwindows in the file system?/etc/
/home/
/usr/
what is the terminal client?a program providing access to a shell prompt
what provides the foundation for a wide range of graphical tools and windows managersxwindows
what desktop enviornment is developed specifically for use on lower-powered computersLXDE
commands to combine or show contents of one or may files at a linux CLIcat
Which desktop enviornemnt does fedora core linux use by default?no answer
Linux is used as a server more than it is used as a desktop operating systemTrue
Ch 15
What is the conky app used for?Monitoring
What kill signal will do a sigterm15
sigkill9
ctrl+c2
location of log files/var/log (not usr/log)
message buffer linux kernaldmesg
continuously view contents of filetail
display bash processps aux grep bash
linux desktopvvnc viewer
syste log file/var/log/syslog
free disk space dfTrue
applications do not create their log filestrueXFALSE
memFalse
Ch 6
What command changes the access permission of a file or directory?chmod
For files & directories, what are the three categories that can be given permissions?User, group, other.
What command changes ownership?Chown
What file defines the groups on linux?/etc/group
what command will create a new group?groupadd
what is the main purpose of using groups?grant/revoke permissions to many users
name of adminroot
only user always use rootNo
run commands as administrator sudo
default the root account is turned onno
In linux, everything is a fileTrue
System user account is used fordaemons
linux user accouts/etc/passwd
What are permissionsread write execute
Regular user ID's rangefrom 1000-65533
what command creates or modifies a user's passwored?passwd
what command will create a new user account?useradd
What is the default shell for new user accoutns in Ubuntubash
what file is about password stuff?/etc/shadow
what command controls hw permissions are set for newly created files and directories?chmod?
which file should be viewed to see if an account is disabled?/etc/passwd
Which file in Ubuntu and Red Hat states the group that a user needs to be in the able to run the sudo command?/etc/login.defs /etc/sudoers /etc/group
Ch 18
What is the package name used to install the ssh server that once installed allows users to remote into the computer via sshssh
sshd
ssh-server
openssh
What is a replacement to FTP that uses SSHFTPS
SFTP
scp
rcp
What is the command to use ssh as a client?ssh
sshd
openssh-server
ssh-server
What is the home page for telnet?telent.org
intertel.net
!e11net.me
telnet.net
none of the above
Given the below prompt and command, where will a file be located on the remote machine?/
/root/
/home/
/home/user1/
telnet is a replacement to SSH FALSE
VNC is not made for the graphical interface.FALSE
Ch 17
How long are the length of IPv4 addresses?32 bits
The Netmask is used for...Network portion & Host Portion
Communication directed to oneUnicast
Communication for all hostsBroadcast
Physical hardware addressMAC Address
What cable uses twisted pair wireUTP(Unshielded Twisted Pair)
Network star archetectureSwitch
Pass data from one net to anotherRouter
view and conf net int settings ifconfig
Build route tables and inforoute?
status of network socketsnetstat?
hostname resolution w/aliasetc/resolv.conf NO hosts
dsn server settingsetc/hosts NO
http TCP comm port80
ssh tcp port comm22
transmission control protocolTCP
user datagram protocolUDP
dynamic host control protocolDHCP
Internet ProtocolIP
ubuntu comes with dchp clientTrue
ip v4 address is dotted-decmialTrue
port #s exist for applicationsTrue
/etc/resolv.conf not modified False
tcp is connectionless False
Ch 14
PID of init?1
what contains the bootloader code and partition tableMBR
what locates the kernel on the disk and loads it into ramBootLoader?
the files in the rc*.d directories are symbolic linksTrue
what command will allow you to chagne runlevels on the flytelinit
what are applications that run at boot time in the backgrounddaemons
what command allows viewing o kernel output after bootingdmesg
what directory contains the rc.d directories/etc
what init is single user mode with root access1
what is the default runlevel for ubuntu15+5
what runlevel will reboot the sustem6
the traditional command to stop the service "ufw"sudo /etc/init.d/ufw stop
ubuntu replaced init with systemdTrue
Ch 12
What command changes the access permissions of a file or directorychmod
What command changes the ownership of a file or directorychown
For files and directories, what are the three categories that can be given permissions?User, Group, Other
What contains the list of gropus taht exist on the Linux system?/etc/group
What command will create a new group?Groupadd?
What is the purpose of using groups? Grant or revoke permissions to a large number of users quickly and easily.
What is the name of the administartor(super-user account) in linux?root
In ubuntu, what command lets you run a command with administrative privelages? sudo
What file stores the list of all Linux user accounts?/etc/passwd
What three permissions can be tied to the user category of a file or folder?read/write/execute
An administrative account known as a System User Account, is used toRun day-to-day applications
Ch 9
What dose APT stand for in Debian/Ubuntuadvanced package tool
What command will uninstall a package but leave behind config filesapt-get remove
What command will uninstall a packand remove config filesapt-get purge
What command will download the lates list of available software packages?apt-get update
What command will cause the syustem to upgrade all installed packages to the latest versionapt-get upgrade
Synaptic is installed by default?Flase
What is the name of the graphical packages management system in ubuntu?Ubuntu Software Center
Ch 11
What command is also known tape archive, makes many files into one filetar
what is the proper syntax to supress the output of a command?verboseprocess > dev/nul
what is a simple text editor similar to the classic pico text editornano
what text editor is found on every unix systemsvi
in the vim editor what key moves teh cursor down? hjkl? j
in the vim editor what key deletes a characterx
in the vim editor what will quit the program without saving changes?:q!
in the vim editor what key moves the cursor up?k
in the vim editor what will quit the program and save chagnes?wq
in the vim editor what will allow you to search the document?/
what command changes the fil access permissions?chmod
what command creates links between filesln
what command copiles and installs pogramsmake
what command displays manual pages for reading?man
what command is used to make directoriesmkdir
what command lists processesps
what command will display resources usages and prcess utilzationtop
what command will send the value ofa variable to the standard outputecho
what command prints disk usagedu
what command is used to find files by searchingfind
working from the command line isnt for connecting to a remote text-only systemfalse
Ch 7
software for linux can be installed through repositoriesTrue
what command will remove orphaned packagesapt-get autoremove
Which of the below commands will display the ubuntu version installed on the system?lsb_release -a
Which command below upgrades the ubuntu OS to the latest distribution?do-release-upgrade
the zypper commandopensuse
Which of the following commands nonot use online repositories?dkpg. apt rpm yum zypper yast
The yum command is used on which of the floowing distributions?centOS
Ch 8
The command stated below will show the current configuration of IP addresses on network interfacesip addr
What comand is used to view and temporarily configure network interface settings?ifconfig
What command is used to view and temporarily configure the routing table?route
You need to refernce a computer by name instead of IP address. Select the file you should use/etc/hosts
What file spefcifies the network DNS server settings/etc/resolv.conf
Which file on your ubuntu server should be modified to seet a permanent ip address/etc/resolv.conf
What command will display the default gateway?route
Which command was built to replace ifconfig and route?ip
While logged in as a normal user, which command will bring ens33 down?sudo ifdown ens33


CHapter 3, The GUI - WHAT IS A GUI
-A Graphical User Interface (GUI) is the combination of many softwares to create an easy to use user experience based on rendered images.
-Used instead of the Command line interface (CLI)
-Uses various methods for user interaction
-Keyboard
-Mouse
-Touch
-Eyes
-Speech
-Facial Expression
-Device Movement (Gestures)



X WINDOWS
-Inspired by the W Windows System from Stanford, the X Windows System from MIT came about in 1984.
-Also known as XFree86, X11, X11R7.
-Provides the foundation for modern *nix GUIs.
-Licensed under MIT License.
-Maintained by X.Org which is also the website.



STARTING THE GUI
-Booting to the CLI, the command "startx" could be run.
-Allows a lighter startup routine
-Graphics are optional
STARTING THE GUI
-Booting to the CLI, the command "startx" could be run.
-Allows a lighter startup routine
-Graphics are optional



RUNLEVELS
-Debian/Ubuntu Runlevel
-0 = Halt (shutdown)
-1= Multiuser no GUI
-2= Multiuser with GUI
-6= RebootNote: Never set the default runlevel to 0 or 6. This would cause the computer to never reach a useful state.
-The default can be set by the /etc/inittab fileEdit the file /etc/inittab Modify/Add the line -> id:1:initdefault:where "1" is the runlevel.Save, Close, Reboot to test



CHANGE WINDOW MANAGER
-Linux can run multiple window managers at the same time.
-Common window managers: Unity, GNOME, KDE
-GNOME is installed by searching for ubuntu-gnome-desktop
-KDE is installed by the package kubuntu-desktop
-Both are large downloads
-Set the desired window manager before login
-Just log-out to change to a different one



WHY UNITY?
-Mark Shuttleworth- "Our goal with Unity is unprecedented ease of use, visual style and performance on the Linux desktop."
-It's built to be useful on touch interfaces
-Doesn't use a menu system like in Windows
-Search is the primary method to run something.



THE DESKTOP
-Workspaces
-Not enabled by default
-Multiple desktops/screens to switch between
-Enable by installing Unity Tweak Tool or CompizConfig Settings Manager
-The Panel-Used as the menu for all programs
-Menu only appears when mouse is moved over it
-There is an option to make the menu for programs appear in the program window instead.



KEYBOARD SHORTCUTS
-The Windows Key
-The "Special Key" - pressed it opens Dash
-Press and hold to see complete list
-Middle mouse button opens more than one instance of an app
Alt-tab to switch between running apps (while holding Alt, press the ` key to preview selected app)-Ctrl+Alt+T to open a terminal!


=======CHAPTER 7, THE GUI=========
Many different desktop environments can be installed.
-Depending on needs or taste one might choose one over another
-Installed by searching for the package and installing it... like an app
KDE
-Started in '96 with the goal of a polished, consistent, and well integrated interface.
-More for the end user than the sys admin
-A temporary licensing dispute caused some to leave the project and start GNOME.
-The Kubuntu distro comes with KDE as the default desktop environment.
-http://www.kubuntu.org/
XFCE
-Started in '96 as a simpler environment needing less RAM and Processor power than GNOME and KDE.
-It has become somewhat similar in appearance to what GNOME use to be.
-http://xubuntu.org/
XFCE
-Started in '96 as a simpler environment needing less RAM and Processor power than GNOME and KDE.
-It has become somewhat similar in appearance to what GNOME use to be.
-http://xubuntu.org/
LXDE
-Began in '06 in Taiwan.
-Energy saving and extremely fast and performing desktop
-Hardware requirements are similar to Windows 98Proc: Pentium II 266 MHzRAM: 192 MB
-Used as a boot disk GUI for some distros.
GNOME
-Started in '97 after a disagreement over the use of non-free software use in KDE.
-Made for desktop use and ease
-Full name: GNU Network Object Model Environment


===============SOFTWARE MANAGEMENT==============
APT COMMANDS
-apt-get update
-Updates the local list of available packages from online repositories
-apt-get upgrade
-Downloads and upgrades the installed packages to the latest version found in the local listing
-apt-get install motion
-Installs the program 'motion'
-apt-get install mplayer chromium-browser
-Installs 'mplayer' and 'chromium-browser'
APT COMMANDS
-apt-get remove mplayer
-Removes the package mplayer but leaves behind config files and dependencies.
-apt-get purge mplayer
-Removes 'mplayer' and it's config files. Will leave behind dependencies. There's an error on page 147 in the book. So watch out for that. See the errata.
-apt-get autoremove
-Removes unneeded dependencies from the system.
-apt-get clean
-Removes all cached packages that have been downloaded from repositories
-apt-get dist-upgrade

-Upgrades all installed packages like apt-get upgrade, does more dangerous installation of newest kernel, also removes unneeded packages like autoremove
-do-release-upgrade

-Upgrade the operating system of Ubuntu to the latest release (14.04 LTS -> 16.04 LTS)
APT-CACHE COMMANDS
-apt-cache search kde
-Search package list for a regular expression pattern "kde"
-apt-cache search -n kde
-Search package list for a regular expression pattern "kde". Only search on package names not the long descriptions. (see man page).
-apt-cache search -n ^kde
-Search package list for a regular expression pattern "kde". Only search on package names not the long descriptions. (see man page). Matches must start with kde.
-apt-cache showpkg kde-full
-Show the package details of kde-full. Notice the checksums, the locations, and dependencies. You can bet that each dependency has a series of dependencies of its own.
DPKG COMMANDS
-dpkg install skype.deb
-dpkg --get-selections
-Show all installed software packages.
-dpkg --configure -a
-Restart install from last successful command. (useful for apt-get upgrades that fail).
OPENSUSE SOFTWARE MANAGEMENT INTRODUCTION
-zypper command is used to manage software that is based on Internet repositories.
-zypper update
-Updates the installed packages to newest version
-zypper install motion-Installs the motion package
-zypper remove motion-Removes the motion package
-The rpm command can manage .rpm files and software that are not on repositories.
REDHAT/CENTOS SOFTWARE MANAGEMENT INTRODUCTION
-The yum command manages RedHat based package management. CentOS is RHEL Server without paid subscription.
-yum update
-Updates the installed packages to the latest version
-yum install nano
-Installs the nano file editor
-yum remove nano
-Removes the nano file editor
-The rpm command can manage .rpm files and software that are not on repositorie


==================THE SHELL CH 11==================
Command Line 101...
-The Command Interpreter (a.k.a SHELL) deciphers commands entered at the command prompt
-The Command Interpreter:
-Interprets commands with their options and arguments
-Translates special characters
-Finds the location of the command
-Executes the command
Command Line 101...
-Most popular shells:
-Ash
-Bash - Most popular; Linux standard
-Csh
-Ksh
-Tcsh
-zsh
Common Shell Features
-Command history
-Press the up/down arrows to view previously entered commands
-Also can type "history"
-Command completion using TAB
Basic Commands
-cdcd cd .. cd ~ cd - cd /
-lsls ls -l ls -i ls -a ls /
-manman lsman man man cd
-cat(concatenate) cat afile bfile cfile
-cpcp source destination
-mvmv source destination
-more/lessmore /etc/hosts less /etc/hosts
-grep grep pattern /etc/somefile
-top
Basic Commands
-echoecho "This line" echo $PATH
-find find / -name hosts
-locatelocate hosts
-vivi /etc/hosts
-emacsemacs /etc/hosts
-Wildcards(*, ?)mv logfile?.txt logfiles/cp * /bkup/2014-09
Basic Commands (cont.)
-mkdir-p this/that/theother -Makes the parent directories-md can be used instead of mkdir
-rm(example: rm *; rm -rf)
-Remove directories and files, -rf=recursive force
-shred afile
-Default use above just overwrites the file.
-Some good options: -vzu (verbose, zero, remove file)-limited effectiveness in journaled file systems
Basic Commands (cont.)
-man- -k (searches)
-Online
-info(example: info coreutils)
-Replacement for MAN
-http capabilities for jumping to different topics
-| (Pipe)-Send the output of one command to the input of another. ifconfig |grep addr
-Multiple piping: ifconfig |sort |grep addr
Basic Commands (cont.)
-Which- path of shell commands
-Headand Tail- view head or tail of file
-Tar- archive utility for packaging files
-Aka tarball: tar -xvf file.tar ortar -xzvf file.tar.gz
-Makes many files into one or one file into many
-No compression without another program -gzip
-Gzip- file compression utility
Basic Commands (cont.)
-useradd
-useradd -m test
-groupadd
-groupmod
Common Tasks
-Redirecting (> or >>)
-Take the standardout (stdout) of a program and direct it into a file
-> is to create/overwrite a file and input data
->> is to create/append to a file
-Pipelining or using the | symbol
-head afile | sort > bfile Grab first 10 lines of afile and send the output to sort. Then, have sort redirect its output to a file called bfile
Other special characters
-.
-..
-?
-*
-~
Ownership and Permissions
-drwxrwxrwx - the mode
-"ls -l" to view security/mode
-chmod- change mode/security
-Ex.: chmod u+rwx afile
-Alphanumeric: u+rwx,go-rwx--rwx------
-Numeric: 700--rwx------

-chown- change owner

-touch- update modify date or create file
File and Folder Links
-ln file1 file2
-Hard link: data of file1 to a second MBR entry named file2. Links the inodes.
-Appears as a regular file.
-Data is not available after all hard links are removed.
-ln -s file1 file1link
-A shortcut to a file name
-Looks like a link in the directory listing
Other Terms
-Compile - To process source code to make a program.
-Standard Input (aka. stdin) - keyboard
-Standard output (aka. Stdout) - scree