root@debian:~$ dpkg --get-selections > /root/package-selections
In response to Voice of the Masses
My favourite Desktop is Unity because it is not MATE. This has been bugging me for quite some time.
Like almost everyone else on the planet, I was unhappy when in 2011 Canonical declared Unity Ubuntu’s new default desktop. After years of using GNOME 2, I just thought that Unity felt a bit awkward. But I stuck with it, mainly for a perceived lack of alternatives and my wish to avoid PPAs if at all possible.
Fast-forward a few years and, thanks to the excellent Martin Wimpress, I hear of MATE Desktop Environment almost every other podcast I listen to. With the release of Ubuntu 15.10, MATE is finally elevated to official flavour status and I was sure to be making the switch away from Unity.
I ended up using MATE for about one day before going back to Unity. It was quite an uncomfortable thing to have to admit, but there was a problem: After years of using Unity, I just thought that MATE felt a bit awkward…
user@ubuntu:~$ sudo apt-get autoremove
user@ubuntu:~$ ssh-copy-id email@example.com
The screen command allows you to detach a running process from a session and then reattach it at a later time. Its use is simple:
user@debian:~$ screen yourlinuxcommand
Now that yourlinuxcommand is executing, press Ctrl+A followed by D to detach the screen.
Obtain a list of all the running screen processes:
user@debian:~$ screen -ls
There is a screen on:
18470.pts-0.server(02/03/14 10:03:43) (Detached)
1 Socket in /var/run/screen/S-user.
Note the screen id in the above output. Use the screen id to reattach the session at anytime:
user@debian:~$ $ screen -r 18470.pts-0.server
“Ubuntu could have stayed relevant if Canonical hadn’t tossed aside its user base to pursue Unity and tablets.” Barbara Hudson shares her doubts about Canonical’s apparent strategy for Ubuntu.
“We need to defend ourselves against the predatory practices of some companies making us look bad: a relatively small number of people do enough detective work to realise that it’s the fault of a particular Windows application, but many more simply blame our operating system because it won’t start any more.” Debian developer Colin Watson asks for your help in an effort to mitigate the problems caused by antifeatures built into Windows software that result in broken Windows/Linux double-boot systems.
postfix is Ubuntu’s default mail transfer agent (MTA) and can be configured to deliver mail using a relay host that requires SMTP authentication. Get the necessary packages with the following command:
user@ubuntu:~$ sudo apt-get install postfix bsd-mailx
Begin to configure your postfix installation by choosing satellite system as the general type of configuration. Enter the local machine name as the mail name (eg mycomputer.edafe.org) and the SMTP server address of your email service provider as the SMTP relay host (eg smtp.relayhost.com). Edit the file /etc/postfix/main.cf and add the following:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
Create the file /etc/postfix/sasl_passwd and make the following entries:
Substitute smtp.relayhost.com with the address of the SMTP relay host and user:password with your login details. Continue by executing the following three commands:
user@ubuntu:~$ sudo chown root.root /etc/postfix/sasl_passwd
user@ubuntu:~$ sudo chmod 600 /etc/postfix/sasl_passwd
user@ubuntu:~$ sudo postmap hash:/etc/postfix/sasl_passwd
Instruct postfix to reload its settings with the following command:
user@ubuntu:~$ sudo /etc/init.d/postfix reload
Making changes to the alias table
The aliases table provides a system-wide mechanism to redirect mail for local recipients. Edit the file /etc/aliases to contain the following entries:
The localuser is the system administrator. Substitute firstname.lastname@example.org with the email address that you would like mail for the root user to be redirected to. Finally, update /etc/aliases.db using the following command:
user@ubuntu:~$ sudo newaliases
SMART stands for Self-Monitoring, Analysis and Reporting Technology and is built into most modern hard disks. The smartd daemon is part of smartmontools and monitors a disk’s SMART data for any signs of hardware problems. SMART is available with Parallel and Serial ATA disks, drives appearing as either /dev/hd* or /dev/sd*, respectively. Use the following command to obtain relevant information for your system:
user@ubuntu:~$ df -hl
If required, start by configuring postfix to redirect mail for the local root user. Get the necessary packages with the following command:
user@ubuntu:~$ sudo apt-get install smartmontools bsd-mailx
Edit the file /etc/smartd.conf and comment out any lines beginning with DEVICESCAN. If you are using a netbook or a laptop, add the following line for the smartd daemon to monitor the device /dev/sda:
/dev/sda -a -d ata -n standby -o on -S on -m root -M daily -M test
If you are using a desktop or a server, add the following line for the smartd daemon to monitor the device /dev/hda:
/dev/hda -a -d ata -n never -o on -S on -s (L/../../7/04|S/../.././02) -m root -M daily -M test
See man smartd.conf for more information on how to tailor the operation of smartd to your needs.
Edit the file /etc/default/smartmontools and uncomment the line containing start_smartd=yes. Restart the smartd daemon with the following command:
user@ubuntu:~$ sudo /etc/init.d/smartmontools restart
Verify that the local root user has received a test message from the smartd daemon. From now on, the smartd daemon will monitor the disk and, in the event of impending disk failure, alert the local root user by email.
“As a lifelong Windows user, system builder, ex-gamer, and performance freak, I’m not drinking anyone’s Kool-Aid. I just want the most amount of control over my system as possible, and at this point in time, Ubuntu is the best follow-up to Windows XP.” Adam Overa walks the Windows user through the Ubuntu installation process from downloading the CD image to finding help online.
Ubuntu is a relatively new flavour of Linux. Since the release of ‘Warty Warthog’ in October 2004, it has become the most popular Linux distribution worldwide. Similar to its parent, Debian GNU/Linux, Ubuntu is based entirely on free software. It inherits outstanding package management and provides one-click access to thousands of downloadable applications.
Ubuntu can be installed as an application inside an existing Windows installation. This provides new users with a great opportunity to try Ubuntu at no risk to their existing setup. Ubuntu 8.10 (Intrepid Ibex) is the latest version and available for download from today.
“Umpteen number of reports have been published telling people why they should consider switching to the Mac OS now that Vista has failed.” Prosenjit Bhattacharyya suggests Ubuntu as another alternative.
“If you’ve flirted with the idea of switching your desktop operating system to Linux but never took the leap, the time is now.” Kevin Purdy highlights key features of the latest Ubuntu Long Term Support (LTS) release.
VMware Tools is a suite of utilities that enhances the performance of a virtual machine’s guest operating system. Begin by setting up a new virtual machine and installing Ubuntu 6.06 LTS as the guest operating system. Start the virtual machine and log in as a user belonging to the admin group. You are now ready to install VMware Tools. Get the necessary packages with the following command:
user@ubuntu:~$ sudo apt-get install build-essential linux-headers-`uname -r`
Become root and create a symbolic link with the following commands:
user@ubuntu:~$ sudo su
root@ubuntu:/home/user# ln -s /usr/src/linux-headers-`uname -r` /usr/src/linux
On the host, select Virtual Machine > Install VMware Tools… from the VMware Workstation menu. After the guest has mounted the VMware Tools installation virtual CD, change the active directory and copy the VMware Tools archive with the following commands:
root@ubuntu:/home/user# cd /root/
root@ubuntu:~# cp /media/cdrom/VMwareTools-7.6.3-87978.tar.gz /root/
Extract the contents of the archive and then change the active directory with the following commands:
root@ubuntu:~# tar -zxvf VMwareTools-7.6.3-87978.tar.gz
root@ubuntu:~# cd vmware-tools-distrib/
Invoke the install script with the following command, choose to install the binary files in /usr/local/bin and and set your desired screen resolution:
The NTP protocol allows you to synchronise the clock of your computer with that of dedicated time servers on the Internet. Get the necessary packages with the following command:
user@ubuntu:~$ sudo apt-get install ntp-simple ntpdate
Stop the ntpd daemon and manually synchronise your computer’s clock with the following two commands:
user@ubuntu:~$ sudo /etc/init.d/ntp-server stop
user@ubuntu:~$ sudo ntpdate pool.ntp.org
Modify the file /etc/ntp.conf to read:
# You do need to talk to an NTP server or two (or three).
Start the ntpd daemon with the following command:
user@ubuntu:~$ sudo /etc/init.d/ntp-server start
After about one minute, query the status of the ntpq daemon with the following command:
user@ubuntu:~$ sudo ntpq -p
You can further increase the accuracy of time synchronisation by using the time servers in your continental or country zone.
Using Samba and CUPS, the Common UNIX Printing System, Ubuntu can easily be configured to provide printing services to a heterogeneous network of Windows, Macintosh and Linux clients.
Printing with CUPS
Get the necessary packages with the following command:
user@ubuntu:~$ sudo apt-get install cupsys foomatic-filters-ppds
Add the user cupsys to the group shadow:
user@ubuntu:~$ sudo adduser cupsys shadow
Get the file cupsd.conf and move it to /etc/cups/:
user@ubuntu:~# sudo wget "https://edafe.org/ubuntu/cups/cupsd.conf"
user@ubuntu:~# sudo mv cupsd.conf /etc/cups/
The downloaded file contains the following changes from the Ubuntu default configuration:
# Default authentication type, when authentication is required...
# Restrict access to the admin pages...
Setting these options enables members of the admin group to modify the configuration of the CUPS server from clients sharing the same local network.
Modify the file /etc/cups/cups.d/ports.conf to read:
For 192.168.0.123, substitute the IP address of your machine on the local network.
Restart cupsd with the following command:
user@ubuntu:~$ sudo /etc/init.d/cupsys restart
Use a web browser to access http://localhost:631/admin (or http://192.168.0.123:631/admin from another machine on your local network). Go to Administration > Add Printer and begin to set up your printer. When prompted by the system, authenticate yourself as a member of the admin group. If necessary, obtain the correct PostScript Printer Description (PPD) file for your printer model. Print a test page to confirm that your printer is working properly with CUPS.
Making Printers Available over the Network
Install and configure a Samba server and then add the following options to /etc/samba/smb.conf:
printing = cups
load printers = Yes
printcap name = cups
comment = All Printers
printable = Yes
path = /var/spool/samba/print
browseable = No
guest ok = Yes
read only = Yes
Create the directory /var/spool/samba/print and set its permissions with the following two commands:
user@ubuntu:~$ sudo mkdir -p /var/spool/samba/print
user@ubuntu:~$ sudo chmod 1777 /var/spool/samba/print
Restart the Samba server with the following command:
user@ubuntu:~$ sudo /etc/init.d/samba restart
Set your Samba clients to use a printer driver that outputs generic PostScript. Use the the Apple LaserWriter driver on Windows, the Generic PostScript driver on Mac OS X or the Raw Standard driver on Ubuntu.
This post has been updated.
user@ubuntu:~$ sudo adduser username admin
There are many different tools that you can use to edit configuration files. Because of its simplicity, I personally like to use Nano:
user@ubuntu:~$ sudo nano /path/to/the/file
You can change the default settings for nano by editing its configuration file. For example, to stop nano from wrapping text simply make the following changes to /etc/nanorc:
## Don't wrap text at all.
RAID stands for Redundant Array of Inexpensive Disks and refers to the use of multiple hard disks to share or replicate data between drives. For RAID-1, you need two partitions of identical size on two separate disks which are not connected to the same IDE/Parallel ATA-bus. Use cfdisk to create the two partitions /dev/hdb1 and /dev/hdc1. Set their respective types to FD and do not set their bootable flags. Create the RAID-1 array with the following command:
user@ubuntu:~$ sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hd[bc]1
Create a filesystem on the RAID device with the following command:
user@ubuntu:~$ sudo mke2fs -j /dev/md0
Create an empty directory /raid as a mount point and add the following line to /etc/fstab:
/dev/md0 /raid ext3 defaults 0 2
Mount your RAID array and check its status with the following commands:
user@ubuntu:~$ sudo mount /raid
user@ubuntu:~$ sudo mdadm --detail /dev/md0
Monitoring the RAID Array
If required, start by configuring Postfix to redirect mail for the local root user. Obtain the UUID of your RAID device with the following command:
user@ubuntu:~$ sudo mdadm -D /dev/md0
Create the file /etc/mdadm/mdadm.conf and add the following three lines, replacing 47d1eee2:2cbfr68v:34×75168:142ef912 with the UUID of your RAID:
DEVICE /dev/hdb1 /dev/hdc1
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=47d1eee2:2cbfr68v:34x75168:142ef912
Edit the file /etc/init.d/mdadm and append –test to the line beginning with start-stop-daemon -S:
start-stop-daemon -S -q -p $PIDFILE -x $MDADM -- -F -i $PIDFILE -m $MAIL_TO -f -s --test
Restart the mdadm daemon with the following command:
user@ubuntu:~$ sudo /etc/init.d/mdadm restart
Verify that the local root user has received a test message from the mdadm daemon. From now on, the mdadm daemon will monitor the integrity of the RAID array and, in the event of any problems, alert the local root user by email.