Install HandBrake on Ubuntu 18.04

HandBreak is an OpenSource Video transcoder available from https://handbrake.fr. It can convert video to various format.

Latest version of Handbreak available in Ubuntu PPA. To install, enable Handbreak PPA

Install handbreak with

kvm-os-image

Install Linux KVM on Ubuntu

Linux KVM is virtualisation software that allow you to create virtual machine under linux. To install on Ubuntu, run

Install libvirtd, this allow you to easily create KVM virtual machines and allow remote connection from virt-manager GUI application.

Enable and start libvirt

At this stage, you should be able to connect to KVM server form your computer using virt-manager.

Downloading ISO

Before you can setup any VM, you need to download ISO image for the OS. Here i downloaded ISO image for Ubuntu 19.04

Once downloaded, you should be able to select this ISO image in virt-manager when creating a VM.

See Linux KVM

ubuntu-software-updates

Install drivers on Ubuntu

To install drivers on Ubuntu using command line, run

This list all drivers available for your hardware. You can install a driver with apt. In this cuase, i have 2 drivers available

First driver is recommended by Ubuntu. To install, run

Install Driver using Software & Updates

Start software and updates application.

Click on Additional Drivers tab. You will see available drivers for your computer.

LXD container snapshot and restore

lxc allow you to take snapshot, restore snapshot of a container.

Here we create a snapshot, then delete the /etc folder from the container. Now the container is useless. Restore the container from snapshot to get it work again.

lxc list containers

Install LXD on Ubuntu

LXD is tool to manage LXC (Linux Containers). lxd allow you to create and manage light weight linux containers, it is like docker, but more like an actual virtual machine. LXD is more user friendly than using LXC directly, have more features like clustering of servers.

On Ubuntu/Debian, run

Before you start using lxd, run

Just press enter for all questions. Defaults should work. lxd is demaon, only used one time during “lxd init”. After this, you will be using lxc command for everything.

To create a container, run

To list all containers, run

lxc list containers

To stop a VM, run

To start VM,

shadowsocks firefox settings

install ShadowSocks client in Ubuntu 18.04

ShadowSocks client is part of shadowsocks package. This include both client and server. If you are looking to install server, see Install ShadowSocks server on Debian 10

To install ShadowSocks, run

ShadowSocks client is called sslocal, get installed in /usr/bin/sslocal.

On Ubuntu, no start up script provided with this package, so you need to create one or manually run sslocal when required.

Create a service file

Add following content

Now we need to create a configuration file with your ShadowSocks server IP and password.

Add following content

“server” = IP of the server where you installled ShadowSocks server.
“server_port” = Port used by ShadowSocks server
“password” = ShadowSocks server password.

local_port can be anything you like.

Enable shadowsocks service

To start

To see status

Now you can configure your browser or other sock proxy supported application using 127.0.0.1:8044. Here is how to configure firefox

shadowsocks firefox settings

Setting up MineCraft Server in Ubuntu

To setup MineCraft server on Ubuntu, first you need to install Java.

Create a user to run minecraft

You can set a password if you want direct SSH login to this user or login as root, then “su – minecraft”.

Login as user minecraft with SSH or “su”.

Download minecraft server .jar file from

https://www.minecraft.net/en-us/download/server/

At the time of writing, i downloaded

Don’t use above link as it can get older, always go to minecraft site and get new link, so you get latest minecraft server jar file.

You can start minecraft server with command

First time when you run, it exit with some error related to EULA.

You need to edit file

Set

Now minecraft will run. You can create a run.sh file with following command for starting minecrat easily.

Paste following content

To make the file executable, chmod it 755

When you start minecraft from terminal/ssh, it get closed when you disconnect. To keep minecraft server running after you disconnect, use tmux or screen.

Ubuntu Configure systemd-resolved

Latest Ubuntu/Debian use systemd-resolved for DNS resolution. On a fresh Ubuntu 19.04 install DNS failed to resolve.

To fix this, create file

Add content

Restart systemd-resolved

You can find systemd-resolvd status with command

To resolve a domain, use