This document predominantly references the ubuntu distribution. All examples should work on recent releases of ubuntu (12.04, 14.04 or 16.04).
GRUB Boot Loader
The acronym GRUB is short for Grand Unified Boot Loader
GRUB is for x86-based systems, Das U-BOOT is for embedded systems.
The GRUB2 Configuration file
/boot/grub/grub.cfg is generated using the
update-grub command based on configuration files in
/etc/grub.d/ and the file
To change from a graphical GRUB screen to text-only one, add the following line to your grub configuration. This is sometimes required for compatability when running linux on older ESXi hosts.
SystemV, Upstart, systemd, systemctl
/sbin/init is the first user-level process at system startup. init coordinates the boot process and has it’s origins in older SysVinit distributions.
Modern linux distributions have since replaced SysVinit with one of two new schemes.
- Upstart was developed by Ubuntu and first appeared in Ubuntu 6.10. It was soon adopted by all the major linux distributions.
- systemd began life in the Fedora project (2011) and is now standard in RHEL 7, Ubuntu 16.04 and most mainstream distributions use it.
end of GRUB Bootloader section
SysVinit System Runlevels
|S,s||Same as 1|
|0||Shutdown system and turn power off|
|1||Single User Mode|
|2||Multiple user, no NFS, only text login|
|3||Multiple user, with NFS and network, only text login|
|5||Multiple user, with NFS and network, graphical login with X|
chkconfig command examples
chkconfig is part of SysInitV and not used on Ubuntu 16.04, update-rc.d is the equivelent .
update-rc.d command examples
service command examples
Instead of bash scripts, systemd uses
.service files located in
/etc/systemd/system/ and cgroups have replaced runlevels. systemctl is used to configure and control services under systemd.
systemctl command examples
Show the status of all services that systemd controls
Starting, stopping, and controlling services with systemctl
Restart a service but only if it is currently running
Check the status of a service to see if it is running or stopped
Set a service to start on boot
Disable a service from starting on boot
Get information about any given service
Completely disable a service from startup and being able to run
end of Statup/Shutdown/Services section
Ubuntu Package Management
w/ aptitude, apt-get, apt-cache, dpkg
Upgrade all packages
Upgrade all packages one-liner
- refresh package list
- install package updates w/ no prompt
- cleanup afterwards
Upgrade linux kernel (linux-generic, linux-headers-generic, linux-image-generic)
Turn on automatic security updates
Get information about a package
Search available packages by keyword
Search available packages matching package name only
Show package dependencies
How to find what apt package provides a particular file or binary. This functionality is similar to
yum provides on rpm-based distros and requires you install the apt-file package.
end of Ubuntu Package Management section
Install the full version of vim or vim-enhanced
end of Vim Editor section