I recently decided to refresh my Linux skills. About a decade ago I had to maintain several Linux servers (mail, DNS, web. etc.,) and became fairly acquainted with the Linux operating system but since then I haven't worked with Linux much and so my skills have gotten rusty, to say the least.
I have VMWare Fusion running on my MacBook Air.
1. downloaded the Ubuntu Desktop 18.04 ISO to my laptop. I downloaded the desktop version because I wanted the GUI. The server version does not include the GUI. Since I know I'm rusty the GUI helps me. But the downside is it does not have many of the server apps installed such as Bind9, Apache, Sendmail., etc. I will have to install those applications separately. Installing them is not difficult. Configuring them is another matter.
2. created a new VM and set the iso on the DVD/CD drive so that when the VM boots for the first time it would run through the install.
a. 20gb disk space.
b. 1024 memory
c. 1 processor core
3. the initial installation completed without any issues.
4. after the initial installation the first thing you'll want to do is update your Linux OS.
Apt-get upgrade VS dist-upgrade
I typically upgrade my machines with:
sudo apt-get update && time sudo apt-get dist-upgrade
Below is an excerpt from man apt-get
. Using upgrade keeps to the rule: under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. If that's important to you, use apt-get upgrade
If you want things to "just work", you probably want apt-get dist-upgrade
to ensure dependencies are resolved.
To expand on why you'd want
upgrade instead of
dist-upgrade, if you are a systems administrator, you need predictability. You might be using advanced features like
apt pinning or pulling from a collection of
PPAs (perhaps you have an in-house PPA), with various automations in place to inspect your system and available upgrades instead of always eagerly upgrading all available packages. You would get very frustrated when apt performs unscripted behavior, particularly if this leads to downtime of a production service.
upgrade
upgrade is used to install the newest versions of all packages
currently installed on the system from the sources enumerated in
/etc/apt/sources.list. Packages currently installed with new
versions available are retrieved and upgraded; under no
circumstances are currently installed packages removed, or packages
not already installed retrieved and installed. New versions of
currently installed packages that cannot be upgraded without
changing the install status of another package will be left at
their current version. An update must be performed first so that
apt-get knows that new versions of packages are available.
dist-upgrade
dist-upgrade in addition to performing the function of upgrade,
also intelligently handles changing dependencies with new versions
of packages; apt-get has a "smart" conflict resolution system, and
it will attempt to upgrade the most important packages at the
expense of less important ones if necessary. So, dist-upgrade
command may remove some packages. The /etc/apt/sources.list file
contains a list of locations from which to retrieve desired package
files. See also apt_preferences(5) for a mechanism for overriding
the general settings for individual packages.
The next I decided to do was install Webmin.
Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.
How to install Webmin
Open the file in your editor:
- sudo nano /etc/apt/sources.list
Then add this line to the bottom of the file to add the new repository:
/etc/apt/sources.list
. . .
deb http://download.webmin.com/download/repository sarge contrib
Save the file and exit the editor.
Next, add the Webmin PGP key so that your system will trust the new repository:
- wget http://www.webmin.com/jcameron-key.asc
- sudo apt-key add jcameron-key.asc
Next, update the list of packages to include the Webmin repository:
Then install Webmin:
- sudo apt-get install webmin
Once the installation finishes, you be presented with the following output:
Output
Webmin install complete. You can now login to
https://your_server_ip:10000 as root with your
root password, or as any user who can use `sudo`.
No is a good time to reboot
using terminal issue command
sudo shutdown -r now
Next, I wanted to install a package manager so I can do package or application install via the GUI. I'm not a big fan of the package manager that Ubuntu 18.04 comes with (Software Center) so I installed synaptic which I feel is easier for me to use.
You can install it by running the command:
sudo apt-get install synaptic