wiki.allensmith.net

Personal "Rough Notes" & Useful Links

User Tools


Mint 17 Xfce: Web Development Workstation

Please Note: This document uses both the Command Shell and the Root Command Shell. That is why when Terminal Commands are given below, the command prompt that is expected (ending either in $ or #) is at the beginning of each line − so do not copy & paste that 1st character.

Using the 64bit version of Mint 17 Xfce, boot to the Live Boot desktop from a DVD or USB drive.

Only if you are doing a Reinstall of the OS that was loaded using these instructions:
Run the following 3 commands …

$ sudo vgchange -a y
$ sudo umount /dev/mapper/lts14-root
$ sudo umount /dev/mapper/lts14-home

… then skip down to Run the Linux Mint 17 Installer

Manually Create the LVM Partitions & Volumes

Doing the below will erase all data on the physical drive that GParted is used to setup! This should be done only once, when first loading Linux – as any reload would use the existing LVM Volumes, with the option to not Format/Erase the lts14-home (/home) user home directories.

Depending on the hardware configuration that is to be used, follow either the single drive or the multi-drive instructions provided below:

Single Drive LVM Instructions

GParted → to create the /boot & Physical LVM partitions

  • IF Linux was already installed on a “to be repurposed” hard drive, stop using the swap partition so the drive can be repartitioned.
    • If Linux was installed using LVM → select the lvm2 pv partition → Partition » Deactivate
    • if Linux installed w/o LVM → select the swap partition → Partition » Swap off
  • Device » Create Partition Table (This will cause all data on the HDD to be lost.)
  • Create a 2000MiB ext2 Primary Partition (to be used by /boot … suggested label is bootlvm)

I have seen systems that cannot be updated when /boot somehow runs out of space, while some extremely old (DOS based) utilities might have trouble when the boot partition gets to just under 2GiB (2048MiB). So hopefully 2000MiB is the “safest” boot partition size to use on a large hard drive. (I expect a production Workstation to have a HDD between 240GB to 3TB.)

  • Create an lvm2 pv partition using the remainder of the drive space. (pv01 is a suggested Label for this.)

Using the top of window menu, it is necessary to Select “Edit” » “Apply All Operations” to actually make these changes to the Hard Drive, before Quitting the GParted utility.

Terminal Commands → to create the LVM volumes

The below is assuming that at least a 240GB hard drive is used for this. Also, with how LVM works, leaving any remaining space unused – to permit resizing (enlarging) LVM Volumes as needed, creating other “purpose specific” Logical Volumes, etc.– is very desirable.

  • create & configure the Logical Volume Group & Logical Volumes using the root command shell
    $ sudo -i
  • create the Logical Volume Group
    # blkid     # to confirm LVM2_member is on /dev/sda2
    # vgcreate lts14 /dev/sda2
  • create the Logical Volumes
    # lvcreate -L 32G -n root lts14    # 32GiB Volume for the Linux OS
    # lvcreate -L 8G -n swap lts14    # 8GiB Swap
    # lvcreate -L 160G -n home lts14    # 160GiB for the User home directories
    # ls /dev/mapper    # should output the below
    control  lts14-home lts14-root  lts14-swap
  • now format the (just created) Logical Volumes
    # mkfs -t ext4 /dev/mapper/lts14-root
    # mkfs -t ext4 /dev/mapper/lts14-home
    # mkswap /dev/mapper/lts14-swap
    # exit
    $ exit

Multi-Drive Striped LVM Instructions

The below instructions are to create a striped LVM using 2 hard drives – where those 2 drives are sda (/dev/sda) and sdb (/dev/sdb). If a 3rd drive would be sdc, a 4th drive would be sdd, and so on – then hopefully it should be fairly obvious how to modify the below to use 3 or more drives.

$ sudo fdisk -l    # ensure the 2 drives to use are sda, sdb

GParted → to create the /boot & Physical LVM partitions

  • IF Linux was already installed on a “to be re-purposed” hard drive, then stop using the on-drive swap partition.
    • If Linux was installed using LVM → select the lvm2 pv partition → Partition » Deactivate
    • if Linux installed w/o LVM → select the swap partition → Partition » Swap off

  • Drive sda (/dev/sda)
    • Device » Create Partition Table (This will cause all data on the HDD to be lost.)
    • Create a 2000MiB ext2 Primary Partition (to be used by /boot … “bootlvm” is the suggested Label)
    • Create an lvm2 pv partition using the remainder of the drive space. (pv01 is a suggested Label for this.)

Using the top of window menu, it is necessary to Select “Edit” » “Apply All Operations” to actually make these changes to the Hard Drive, before moving on to the next drive.

  • Drives sdb (/dev/sdb)
    • Device » Create Partition Table (This will cause all data on the HDD to be lost.)
    • Create a 2000MiB unformatted Primary Partition (empty space, so all lvm pv are the same)
    • Create an lvm2 pv partition using the remainder of the drive space. (pv02 is a suggested Label for this.)

Using the top of window menu, it is necessary to Select “Edit” » “Apply All Operations” to actually make these changes to the Hard Drive, before Quitting the GParted utility.

Terminal Commands → to create the LVM volumes

The below is assuming that at least two 160GB hard drives are used for this. Also, with how LVM works, leaving any remaining space unused – to permit resizing (enlarging) LVM Volumes as needed, creating other “purpose specific” Logical Volumes, etc.– is very desirable.

$ sudo -i
# fdisk -l     # confirm to use /dev/sda2 /dev/sdb2
# vgcreate lts14 /dev/sda2 /dev/sdb2
# lvcreate -i2 -I4 -L32G -n root lts14    # 2 drive, 4k stripe, 32GiB
# lvcreate -i2 -I4 -L8G -n swap lts14    # 2 drive, 4k stripe, 8GiB
# lvcreate -i2 -I4 -L240G -n home lts14    # 2 drive, 4k stripe, 240GiB
# ls /dev/mapper    # should output the below
control  lts14-home lts14-root  lts14-swap
# mkfs -t ext4 /dev/mapper/lts14-root
# mkfs -t ext4 /dev/mapper/lts14-home
# mkswap /dev/mapper/lts14-swap
# exit
$ exit

Run the Linux Mint 17 Installer

Optional: … if there is a Squid-Deb-Proxy server on your local network

sudo apt-get install squid-deb-proxy-client
  • Make certain “-client” is at the end of the above command! (Don't install a 2nd .deb proxy server!)
  • Note: installing this while using a Live Boot means it will only exist until the the system is rebooted

  • Run the “Install Linux Mint” application on the desktop
  • Select Language then continue when HDD space & Internet connection OK
  • Installation Type →select Something else
    • /dev/sda1 → Change… → Use as: Ext2 w/ Mount Point: /boot
    • /dev/mapper/lts14-root → Change… → Use as: Ext4 w/ Mount Point: /
    • /dev/mapper/lts14-swap → Change… → Use as: swap area
    • /dev/mapper/lts14-home → Change… → Use as: Ext4 w/ Mount Point: /home
    • “Device for boot loader installation:” → /dev/sda

IF you are doing a reinstall on the same LVM volumes, and there is data on the LVM /home volume from the previous install, make certain that the '“Format” box for lts14-home is UNCHECKED to preserve the user files– including any per-user system/program configuration files– during the reinstall.

  • Select the correct Time Zone, then the correct Keyboard Layout
  • Enter the appropriate information for Your Name, Your Computer's Name, etc.
  • Click the button to Reboot the computer once the installer is finished.

Install the Squid-Deb-Proxy Server

At my Home Office, my Workstation PC is the the one “Production” system that I constantly depend upon . So it had better be the most infrequently reloaded system I have. That– together with how having a local Squid-Deb-Proxy server really makes a noticeable difference when working with Linux systems– is why I installed this on my Workstation PC. That includes that the Lxc Linux Containers also are able to make use of the squid-deb-proxy, when they are running on the same system.

Create and Configure the LVM Volume

If the Linux OS was installed with /var on its own LVM Volume:

Terminal Commands ← to put the Squid Deb Proxy data on it's own LVM volume

  • create & configure squid-deb-proxy Logical Volume and Directories from the root command shell
    $ sudo -i

First Time (only) … creation of squid-deb-proxy data volume:

# lvcreate -L 50G -n debproxy lts14
# mkfs -t ext4 /dev/mapper/lts14-debproxy

  • Install what is needed to use the squid-deb-proxy Logical Volume
    # mkdir /mnt/squid-deb-proxy
    # chown proxy:proxy /mnt/squid-deb-proxy
    # nano /etc/fstab    # add the following line to this file
    /dev/mapper/lts14-debproxy    /mnt/squid-deb-proxy   ext4   defaults   0       2
    # exit

RESTART SYSTEM

  • again, create & configure squid-deb-proxy Directories from the root command shell
    $ sudo -i

First Time (only) … creation of squid-deb-proxy data directories:

# mkdir /mnt/squid-deb-proxy/log
# mkdir /mnt/squid-deb-proxy/cache

  • Finish configuring the LVM volume for the squid-deb-proxy install
    # ln -s /mnt/squid-deb-proxy/log /var/log/squid-deb-proxy
    # ln -s /mnt/squid-deb-proxy/cache /var/cache/squid-deb-proxy
    # exit

Install and Configure Squid-Deb-Proxy Server

$ sudo apt-get install squid-deb-proxy
$ cd /etc/squid-deb-proxy/mirror-dstdomain.acl.d
$ sudo mv 10-default 10-default.old
$ sudo nano 10-default    # copy & paste the following into this empty file
10-default
# /etc/squid-deb-proxy/mirror-dstdomain.acl.d/10-default
#
# network destinations that are allowed by this cache
 
# linux distro archives
.linuxmint.com
uberstudent.net
archive.ubuntustudio.org
repo.linuxliteos.com
packages.medibuntu.org
# Medibuntu repository no longer exits ... permit Internet DNS error
 
# launchpad personal package archives
ppa.launchpad.net
 
# system & development package archives
.mate-desktop.org
download.bitdefender.com
download.virtualbox.org
dlc-cdn.sun.com
download.opensuse.org
nginx.org
dl.hhvm.com
 
# additional mirror domains
mega.nz
mega.co.nz
linux.dropbox.com
deb.torproject.org
dl.google.com
deb.opera.com
 
repo.steampowered.com
archive.getdeb.net
mirrors.dotsrc.org

After 1st Boot Configuration of Mint 17 Xfce

Install squid-deb-proxy Client

Linux Mint uses .deb files to install packages and updates. So for any location that uses multiple Linux computers, downloading these .deb files once, then storing them locally on the network, can make a tremendous difference to how fast installing programs or doing updates happens. (Only the 1st computer has to waaait for the needed .deb files to download from the Internet.)

  • enable using a squid-deb-proxy server – if there is one on the local network
    $ sudo apt-get install squid-deb-proxy-client

    … Make certain “-client” is at the end of the above command! (Don't install a 2nd .deb server!)

Configure & Install the Updates & Drivers

  • Ensure this install will always use the most current version of GIMP, LibreOffice & the Whiskers Menu
    $ sudo add-apt-repository ppa:otto-kesselgulasch/gimp
    $ sudo apt-get install python-software-properties
    $ sudo add-apt-repository ppa:libreoffice/ppa
    $ sudo add-apt-repository ppa:gottcode/gcppa
    $ sudo apt-get update
  • do all Updates → The “Shield” icon in the bottom right corner (that will have a blue symbol in the centre)
    • Select “Install Updates” ← to update the Mint Update Manager
    • Select “Install Updates” again ← to install the available updates

“Standard Answers” to use with the Mint Updater : (what I recommend using)
→ click ”Ok” to any additional changes pop-ups
→ click ”Replace” to any “Replace configuration file” pop-ups

  • Now set this to check for updates only once per day!
    • Open the Update Manager (now w/ a green check) again » top of window menu » Edit » Preferences » Auto-Refresh
      • Change the time interval from 30 min. to 1 day

Linux does NOT have the same “Rollback Drivers” capability of other Operating Systems such as Windows. So if a Proprietary Video Driver “fails spectacularly” – that can leave Linux Mint with no video at all on the display. Or if a Wi-Fi driver “fails spectacularly” that could take out all the networking. (both Wired and Wireless)

If that happens, it can actually be simpler to “start over & reload Linux”. Or an experienced user can use a Live Boot DVD/USB – to then use text commands to set a driver back to something that worked.

Proprietary Video Drivers (drivers provided by the manufacture) are often needed to get acceptable performance on older ATI® or NVIDIA® Video Cards. (Hopefully an older card has a Proprietary Driver available.) For the above reason, any drivers should be tried as early in the load process as possible.

  • load the Proprietary Video driver (if there is any) – then do the below before trying to load other drivers
    • System » Driver Manager → let it search, then load drivers as appropriate
  • Using the Mint Software Manager (“Menu” icon » Software Manager) do the following:
    • Install linux-firmware-nonfree ← Search for “firmware” to find this

RESTART SYSTEM

Change & Install System Software

  • Using the Mint Software Manager do the following:
    • Remove p7zip
    • Install p7zip-full then p7zip-rar ← Search for “p7zip” to find all of these.
    • Install xubuntu-community-wallpapers ← Search for “community wallpapers”
    • Install shimmer-themes ← Search for “shimmer”
    • Install ubuntustudio-icon-theme ← Search for “ubuntustudio”
    • Install ttf-mscorefonts-installer ← Search for “ttf” to find this
      • CHECK the “Do you accpet the EULA license terms?” box, then select “Forward”
    • Install hunspell-en-ca ← Search for “en-ca” to find this … provides Canadian English dictionary support
    • Install smplayer ← an excellent “plays everything” Media Player … that remembers where you left off viewing
    • Remove banshee
    • Install audacious

I have had some “unexpected” things happen using Banshee in the past year or so. I also don't really want a “Media Centre” type player on a Business or Home Office PC. But I do want a reliable media player, both for local files and streaming (Internet) media. For that, the combination of VLC and Audacious seems to meet my needs extremely well.

Change to Using Light-Locker (as a screen-blanker)

  • Change from using XscreenSaver to using Light-Locker (using Light-Locker only as a screen-blanker)
    $ sudo apt-get remove xscreensaver xscreensaver-data xscreensaver-gl
    $ sudo apt-get install light-locker light-locker-settings
  • When XScreenSaver is removed, the Xfce desktop defaults to screen blanking then display standby mode in 10 min. & 15 min.. So to permit Light-Locker to behave as expected, edit xorg.conf and add the below section, to override these Xfce 4.10 defaults for Screen blanking.
    $ sudo apt-get install gksu leafpad    # used to make text file editing easy
    $ gksu leafpad /etc/X11/xorg.conf    # copy/paste the below text into bottom of file
    Section "ServerFlags"
    	Option "BlankTime"   "0"
    	Option "StandbyTime" "0"
    	Option "SuspendTime" "0"
    	Option "OffTime"     "0"
    	Option "DontZap" "false"
    EndSection

Note: When editing xorg.conf– depending on the Display Driver in use– this could be an empty file, or there may already be settings in this file.

One unintended consequence of uninstalling XScreenSaver is that the Screen Lock no longer works. However, If locking the screen is needed, then just using the “Switch Users” icon (beside the “Log Out” icon) will go back to the login screen– without logging the current user out.

Xfce Desktop Configuration

  • right-click the “Menu” icon » Properties
    • “Appearance” tab » CHECK “Position categories next to the panel button”
    • “Behaviour” tab » under Comands UNCHECK the “Lock Screen” item
  • “Menu” icon » Settings » Desktop
    • Background → White/Yellow/Green Flowers background (bubbles.jpg)
  • “Menu” icon » Settings » Appearance
    • “Style” tab → Select “Bluebird”
    • “Icons” tab → Select “elementary Xfce dark”
  • “Menu” icon » Settings » Power Manager
    • General Options
      • When the power button is pressed → set to “Shutdown”
    • On AC » “Monitor” tab
      • Switch off Display → Never
      • Put Display to Sleep → Never
  • “Menu” icon » Settings » Light Locker Settings
    • Blank screen after → set to 118 minutes
    • Switch off display after → set to 120 minutes
    • Enable light-locker → set to “OFF”
    • Select “Apply” then select “Close
  • “Menu” icon » Settings » Removable Drives and Media » “Multimedia” tab
    • Set the Command for Audio CDs to:
      audacious cdda://
    • Set the Command for Video CDs/DVDs to:
      vlc -f dvd:///dev/sr0
    • Set the Command for Portable Music Players to:
      vlc

Workspaces (multiple desktops) is a feature of Linux … but that is also something that can confuse users who are new to using Linux. So clearly, 4 workspaces is too much. That said, I find it extremely useful to have one workspace for what I'm doing on the Internet, and a 2nd workspace for what I'm doing locally on the PC. So that is the manner in which I set this up.

  • “Menu” icon » Settings » Workspaces » Number of Workspaces
    • Change to 2 Workspaces
      • 1st workspace name → On Internet
      • 2nd workspace name → On this PC
  • right-click the Programs Panel » Panel » Panel Preferences… » “Items” tab
    • Add “Workspace Switcher”
      • In the (white) Items area, select the “+” symbol, from the icons along the right edge
      • In the window that opens, from the list of items select “Workspace Switcher”
      • Now select the “Add” button, then the “Close” button
    • Again in the Items area, use the “” symbol to move “Workspace Switcher” above the “Indicator Plugin”
  • Programs Panel » Audio icon » Sound Settings… » check/configure the audio controls/settings

Configure & Install Internet Applications

  • Set Firefox homepage to https://www.google.ca
      • left-click on the “Star” icon (beside the search box) to Bookmark this page
      • Again left-click on the “Star” icon to edit this link
        • Edit bookmark Name: to just “Search engines” & change bookmark Folder: to “Bookmarks Toolbar”
      • Click on the “Google” icon at the very bottom of this page
        • While on the “Google in Linux Mint” page, follow the “How can I add Google to Linux Mint?” instructions.
    • Install the Canadian English Dictionary to enable English spellchecking in Canada.

For any Linux Downloads directly from Google, you need to know if you are running a 32bit or 64bit version of the Linux Mint … As it is up to the end-user to ensure that the corresponding 32bit or 64bit .deb files are correctly selected to install any Google program or plug-in. (Occationally the “best guess” by Google is wrong.)

    • Download the correct .deb file for Chrome → let Firefox “open with gdebi-gtk” » “Install” button
    • run Chrome → UNCHECK Make Google Chrome default browser → Start Chrome
    • run Chrome again → select “Don't ask again” → “No thanks” link (next to bottom left of sign-in box)
  • http://www.google.com/linuxrepositories/ → “Google Voice and Video Chat”
    • Download the correct .deb file for the “Hangouts” Plugin → let Firefox “open with gdebi-gtk” » “Install” button

Install Lxc with (Local) DNS Resolution

Optional Step: Create Separate LVM Volumes for Lxc

The default setup for Lxc (Linux Containers) will use one directory for the the Containers (each container in its own sub-directory), and a separate directory for the Container Snapshots. So I deliberately create a separate LVM volume for each (the containers & the snapshots), to make it easier to move and backup my Lxc systems.

First Time (only) … creation of Lxc volumes:

$ sudo lvcreate -L 100G -n lxc lts14
$ sudo lvcreate -L 100G -n lxcsnap lts14
$ sudo mkfs -t ext4 /dev/mapper/lts14-lxc
$ sudo mkfs -t ext4 /dev/mapper/lts14-lxcsnap

  • $ sudo mkdir /var/lib/lxc
    $ sudo mkdir /var/lib/lxcsnaps
    $ sudo nano /etc/fstab    # add the following lines to this file
    /dev/mapper/lts14-lxc         /var/lib/lxc   ext4   defaults   0       2
    /dev/mapper/lts14-lxcsnap     /var/lib/lxcsnaps     ext4    defaults   0       2

RESTART SYSTEM

Install Lxc & Create Ubuntu LTS Servers

Install Lxc Packages

  • install lxc and the supporting packages required to use this effectively
    $ sudo apt-get install lxc lxctl lxc-templates debootstrap yum cloud-utils qemu-user-static

  • debootstrap ← needed for templates that download .deb files to install – such as the ubuntu template
  • yum ← needed by .rpm base linux distributions – Oracle Linux is the example used below.
  • cloud-utils ← needed to install the ubuntu-cloud template
  • qemu-user-static ← to run containers of non-native architectures – eg. ARM (-a armhf)

Create some Ubuntu LTS Servers

Note: I try to pick a username that indicates what version of Linux the container is running. (In the below, lts14 for Ubuntu 14.04LTS, and lts12 for Ubuntu 12.04LTS.) Replace [password] in the below command lines with a password of your choice. (For the Ubuntu template, the default username & password is ubuntu & ubuntu.)

  • to create a starting Ubuntu 14.04.1 server, 12.04.5 server & Oracle Linux 6.5 server, run the follwing:
    $ sudo su
    # lxc-create -n ubuntu14lts -t ubuntu -- -a amd64 -r trusty --user lts14 --password [password]
    # lxc-create -n ubuntu12lts -t ubuntu -- -a amd64 -r precise --user lts12 --password [password]
    # lxc-create -n oracle -t oracle     # an RPM base Linux Distro/Container
    # exit

Once the server of each distribution and release is created and fully configured, that will then be cloned to create each of the Linux systems that will be used– to do development work, and to work out how to do things.

Install & Configure Local .lxc DNS Resolution

  • to use .lxc domain names for the contianers
    $ sudo apt-get install dnsmasq

Lxc creates an additional configuration file for dnsmasq … so it makes sense to add the configuration needed for (local) .lxc domains to the end of that file.

  • $ sudo nano /etc/dnsmasq.d-available/lxc     # add the following @ bottom of this file
    # Add the IP address for .lxc DNS resolution here.
    server=/lxc/10.0.3.1
  • $ sudo nano /etc/default/lxc-net

    … In this file, remove the leading # to UNCOMMENT the following line ⇒ LXC_DOMAIN=“lxc”

Ubuntu Documentation -- Dnsmasq
“Note that the package “dnsmasq” interferes with Network Manager which can use “dnsmasq-base” to provide DHCP services when sharing an internet connection.”

DNS in Ubuntu 12.04 → Using [dnsmasq-base] as local resolver by default on desktop installations
“The big advantage is that if you connect to a VPN, instead of having all your DNS traffic be routed through the VPN like in the past, you’ll instead only send DNS queries related to the subnet and domains announced by that VPN. This is especially interesting for high latency VPN links where everything would be slowed down in the past.”

The use of Network Manager & dnsmasq together is fine only when using a simple set-up. Therefore, if .lxc local DNS resolution is needed together with Internet Connection Sharing or VPN use, it could become necessary to uninstall Network Manager– then use dnsmasq, etc. to configure everything by hand.

Note: It is possible to use a Linux Container (e.g. vpn.lxc) to access a VPN network. (I'm still working through how to do that.)

Other References:

Can I install dnsmasq as well as (instead of?) dnsmasq-base?
“One thing that made things work better in this particular case was adding
clear-on-reload
to /etc/dnsmasq.d/clear-cache-on-network-switch (because the local DNS server at my office network resolved some fully-qualified hostnames to their internal IPs, and that would break connectivity to them when I moved outside of that LAN).”

Example of Using .lxc Container Names

  • $ sudo lxc-start -n ubuntu14lts -d     # start ubmutu14lts container in the background
    $ sudo lxc-info -n ubuntu14lts     # example output below:
    Name:           ubuntu14lts
    State:          RUNNING
    PID:            7463
    IP:             10.0.3.249
    CPU use:        2.31 seconds
    BlkIO use:      40.86 MiB
    Memory use:     27.78 MiB
    Link:           vethRFW7N4
     TX bytes:      2.15 KiB
     RX bytes:      6.29 KiB
     Total bytes:   8.44 KiB
  • $ ping ubuntu14lts.lxc     # example output below:
    PING ubuntu14lts.lxc (10.0.3.249) 56(84) bytes of data.
    64 bytes from 10.0.3.249: icmp_seq=1 ttl=64 time=0.052 ms
    64 bytes from 10.0.3.249: icmp_seq=2 ttl=64 time=0.069 ms
    64 bytes from 10.0.3.249: icmp_seq=3 ttl=64 time=0.065 ms
    64 bytes from 10.0.3.249: icmp_seq=4 ttl=64 time=0.065 ms
    64 bytes from 10.0.3.249: icmp_seq=5 ttl=64 time=0.067 ms
    64 bytes from 10.0.3.249: icmp_seq=6 ttl=64 time=0.069 ms
    64 bytes from 10.0.3.249: icmp_seq=7 ttl=64 time=0.070 ms
    64 bytes from 10.0.3.249: icmp_seq=8 ttl=64 time=0.068 ms
    64 bytes from 10.0.3.249: icmp_seq=9 ttl=64 time=0.066 ms
    ^C
    --- ubuntu14lts.lxc ping statistics ---
    9 packets transmitted, 9 received, 0% packet loss, time 7999ms
    rtt min/avg/max/mdev = 0.052/0.065/0.070/0.010 ms
  • $ sudo lxc-stop -n ubuntu14lts     # shutdown ubuntu14lts container