Category: Ubuntu

webmin ubuntu
May 3rd, 2016 by ronny

Webmin ubuntu installation

Webmin ubuntu is a powerful web-based interface for system administration for Linux and Unix. Using any modern web browser, you can setup user accounts, configure 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. See the standard modules page for a list of all the functions built into Webmin.

If you haven’t already, go ahead and download Webmin. To download webmin (the latest version at the moment this article was written) go to the following link:

or type wget

Next step is to install or configure webmin ubuntu. To run the installation or the configuration type sudo dpkg –install webmin_1.740_all.deb

After you run the installation you will most likely get some messages about missing dependencies. To solve the missing dependencies type sudo apt-get install -f

This will sort out the missing dependencies.

Thats it for installing webmin ubuntu.

Happy admining!

Posted in Linux, Ubuntu Tagged with: , ,

apt-get install
April 27th, 2016 by ronny

Apt-get install asks for missing CD

If you are using apt-get install you have a Debian based linux distro. After a fresh and clean install of you linux you probably want to start installing your services and tools. And if linux then asks for a missing cd after trying to run apt-get install, it is because the install cd is listed as a repository in your sources.

It is quite easy to fix if you know about repositories and the source file. Use your favourite (or any other) text editor and open up /etc/apt/sources.list
Look for a line that looks something like this:
deb cdrom:[Debian GNU/Linux 8.4.0 _Jessie_ – Official amd64 NETINST Binary-1 20160402-14:42]/ jessie main

And use a # to comment it out, or just delete the line. If you use the net installer versions, they dont contain much more than the base system anyway. And you will kind of need an internet repository to install software packages.

You can now run apt-get update to update your repository sources. It should now download the software packages from internet when you run apt-get install. If you still have problems make sure you have the following lines, or at least main and updates repositories.

# Main
deb jessie main
deb-src jessie main

# Updates
deb jessie-updates main contrib non-free
deb-src jessie-updates main contrib non-free

This example is taken from a Debian 8.4 installation.

That should be it for fixing the missing cd error when running apt-get install.
To get the best Debian based distro, try Debian here:

If you are looking for a way to use a package proxy to save your own bandwidth and the repository hoster, check out my article about setting up your own apt-cacher her:

Thats it for this time, and good luck fixing your repository.

Happy apt-get install !!!

Posted in Debian, Linux, Ubuntu Tagged with: ,

July 4th, 2015 by ronny

Ubuntu Change Hostname

Ubuntu Change HostnameOn Ubuntu you can chose change hostname temporary or permanent.
If you are looking for the Debian Hostname Change, have a look at this link.

Temporary Ubuntu Change Hostname:

To change the hostname temporary, you can use the hostname command. Like in this example:

This will create a temporary hostname. But after a reboot the hostname is back to what it was before you issued the hostname command. To make it permanent follow next step.

Permanent Ubuntu Change Hostname:

To change the hostname permanent you will need to edit two files.
The first file is /etc/hostname
That file contains hostname. In this example, web is the hostname.

The second file you need to edit is /etc/hosts
That file contains the domain name, and FQDN (Fully qualified domain name).
In the, is the domain name. And is the FQDN.

The /etc/hostname file is easy. Just change the one word into your new hostname.

The /etc/hosts is a bit different. Here is an example if we want to change it to localhost web

Take note that you first have the FQDN and then the hostname.

Make Ubuntu Change Hostname into effect:
By just changing the hostname and hosts file, doesn’t make any immediate effects.
You will need to restart the hostname service before making the new hostname take effect.

sudo restart hostname or sudo service hostname restart

If for some reason none of those commands should work. I would use the hostname command to make a temporary hostname (If you can’t just restart the server). And next time the server reboots, it will read the hostname from its config files. Then it should be all good.

Happy hostname!

Posted in Linux, Ubuntu Tagged with: ,

July 3rd, 2015 by ronny

Ubuntu Add User to Group

ubuntu add user to groupHere I will show you how to Ubuntu add user to group. The user needs to exist before we can put him into a group. Check out Ubuntu Add User, if you don’t know how to do it.

We will use the same user as in previous example. We have created the user John. And now we want to put him into the Sudo group. Here is how we do it:
sudo adduser john sudo

John is now a member of the sudo group. But if he is logged in, he will need to re-log for the new group membership to take effect.

Later if you need to remove John from the sudo group. Just run:
sudo deluser john sudo

This will not delete the user. It will only remove him from the sudo group.

That is it really.
Happy grouping!

Posted in Linux, Ubuntu Tagged with: , ,

July 2nd, 2015 by ronny

Ubuntu Add User

Ubuntu Add User
Ubuntu is a multiuser system. So how do we Ubuntu add user?
Adding users in ubuntu is easy. The easiest way is to do it with the terminal.

In this example we want to add a user called John.
Run this:
sudo adduser john

That is it for adding a user in Ubuntu.

If you want to remove it again later. We run:
sudo deluser john

The command above will still leave Johns home folder. If you want to delete John and his home folder we run:
sudo deluser -remove-home john

You will get a warning saying the group John has no members. But the group john will also be removed.
That is how we do Ubuntu Add User.

Happy Adding!

Posted in Linux, Ubuntu

July 2nd, 2015 by ronny

Ubuntu Static IP

ubuntu static ip
Regarding Ubuntu Static IP is mostly a straight forward thing. I wouldn’t think it should be needed on a rented VPS. As they mostly get their IP addresses assigned. Anyway, here is how we do Ubuntu Static IP.

First we need to edit the network interface.
sudo vim /etc/network/interfaces

Change the line:
iface eth0 inet dhcp

iface eth0 inet static

And then add (in this example we use the ip
network # Optional
broadcast # Optional

To exit VIM, press ESC and then type wq and then press enter to save the file.

Now your network interface is configured to use a static ip.
It is still not active. To activate the static ip you will need to reboot or restart the network interface.
In Ubuntu this will have to be done like this:
sudo ifdown eth0 && sudo ifup eth0

Take notice of the both sudo. And you need to issue both commands at once if your are doing this via ssh or any other remote terminal. If not the network interface will go down, and so will your connection.

So this is how to Ubuntu Static Ip.

Happy Static!

Posted in Linux, Ubuntu, Uncategorized Tagged with: ,

June 7th, 2015 by ronny

Disable directory browsing

Disable directory browsingIf you have directory browsing enabled, which it is by default, your users can browse the directories on your web server. This is not particularly good regarding security. So we better disable directory browsing to be on the safe side.

On a Debian server we do that quite easily in the domain config at /etc/apache2/sites-available/
If you have setup more than one domain on your web server, you should go to your domains config file. Here is an example: ‹/etc/apache2/sites-available/
(if you use Apache prior to 2.4 you might not have the .conf extension)

Insert this line into the config file: Options -Indexes

If you only have one domain hosted on your server, you most likely uses the default domain config.
Edit this file: /etc/apache2/sites-available/default
Look for the line: Options Indexes FollowSymLinks MultiViews ExecCGI
And change to: Options -Indexes FollowSymLinks MultiViews ExecCGI

You can now restart or reload your apache server.
service apache2 restart

We have now done disable directory browsing.

Happy browsing!

Posted in Apache, Debian, Linux, Linux Mint, Ubuntu Tagged with:

March 30th, 2015 by ronny

virtual-dvd-drive-iconKVM virtualisation is a Kernel based virtualisation. It actually stands for Kernel-based Virtual Machine. It means that each of your virtual machine will have it´s own virtual hardware, such as network card, graphic card, memory and hard drive.

To setup KVM virtualisation it require a multicore cpu. And virtualisation needs to be activated in the BIOS. Look for virtualisation, Intel VT-x (vmx) or AMD-v settings, and enable it. You might be able to install KVM without virtualisation enabled in the BIOS. But the virtual machines will be extremely slow.

Here is how to install KVM on a minimal Debian installation.

First we assume a ssh server is installed, and sudo.

Step 1:
First we install the essential packages for KVM.
apt-get install kvm libvirt-bin virtinst bridge-utils

If you want to be able to controll the virtual machines from your own users instead of root. Add your user to the libvirt group.
adduser john libvirt

Step 2:
To be able to give network access to your virtual computers you will need to bridge your network card. To do this we will change the network interface file. (Change the ip´s to match your network)
nano /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
iface eth0 inet manual

# Initial bridge
auto br0
iface br0 inet static
bridge_ports eth0

Now you need to reboot your system and verify you can access from ssh and that it has the network accesses you need.

Check out my previous article about how to install libvirt manager on how to create and control the virtual machines.

That´s it for installing KVM on a Debian.

Happy virtualisation!

Posted in Debian, KVM, Linux, Ubuntu, Virtualization

February 19th, 2015 by ronny

remove-from-database-iconApt-get remove is not always enough to remove a package completely. If you try to remove in example the mysql-server package with just apt-get remove, the settings and lot of dependencies will still be left. We will need to purge and clean up. Here is a short desription on how to perform a complete removal of mysql-server with settings and everything.

First you need to run the remove –purge command.
[sourcecode language=”css”]
apt-get remove –purge mysql\*
Next step is probably not recommended by as it will increase their bandwith (unless you run your own apt-get cache server, which I recommend everyone to do). That is to clean the package cache.
apt-get clean

The last step is often forgotten, included by my self. That is to update the file database. Else references to all the deleted files will still be present.

Thats it, and your mysql server is now completely gone.

Happy deleting!

Posted in Debian, Linux, Linux Mint, Ubuntu

February 7th, 2015 by ronny

Hard-Disk-Server-iconOn my home network for some reason my ubuntu machines can´t resolve hostnames when first installed. None of my Debian machines seems to have this issue. If you try to ping a global ip, like googles free name server on, and that work there is a DNS issue. Pinging fails. Can´t resolve hostname it says.

If you try
# cat /etc/resolv.conf

And it don´t contain any name server, we will need to add one.
You could add it directly into resolve.conf, but that would be deleted when you reboot your machine. So the way we need to do it is to add it to the network interface. Like this

# vim /etc/network/interfaces

If eth0 is your network interface, you add a line dns-nameserver to it. On my home network I can use as name server, since that is the gateway to my isp router.

My interfaces file with the dans-nameserver entry.
# The primary network interface
auto eth0
iface eth0 inet static

Reboot and your ubuntu machine should resolve just fine.
Note! If your gateway don´t work as name server you can try some of googles name server. The ip´s are and

Happy resolving!

Posted in Linux, Ubuntu