How to remove symbolic link
December 19th, 2018 by ronny

A short tutorial on how to remove symbolic link in Linux, or Softlink. Symbolic links can be removed or deleted in two different ways. One method is to delete the directory the symbolic link is linking to. The other method is to use the unlink command to remove the symlink.

Method one:

Let’s say you have installed Mediawiki and linked it to /var/www/html/mediawiki. And you want to remove that link. You just simply delete it by: rm /var/www/html/mediawiki

Method two:

We use the same example as above. But this time we use the unlink command instead of rm. That is all really. Just type: unlink /var/www/html/mediawiki

No mater what method you choose, both work as the should delete symlink. That’s how to delete symbolic link or remove symbolic link.

Please also check out How to find the fastest Debian mirror for you.

Posted in Linux Tagged with: ,

write linux code on mac
June 13th, 2016 by ronny

write linux code on mac

How to write linux code on mac. Cross platform code is another term on write linux code code on mac, or any other system for that matter. There is a few things you need to download and install on your mac before starting writing linux code on mac.

First you need to download and install Mono Develop, or Xamarin Studio as it is called now. Xamarin Studio is a cross platform IDE for .net languages like C# and F#. If you want to program in C/C++ you should check out gcc instead. Xamarin Studio runs on Windows, Linux and OS X. And support most .net languages available today. Xamarin Studio is free and can be downloaded here:

Second you need Mono, the cross platform .net framework. Mono project is sponsored by Microsoft, but is free to anyone. You will need this to compile and run your projects written in Xamarin Studio. The cool thing about Mono Project is that you can deploy your programs to most major operating systems. Like Linux, Windows and OS X. As long as they are supported by Mono Project.

To get the Mono Project framework, go to:

To run your code on a Linux system you need to install Mono Project to the Linux system. This will vary from which Linux Distribution you are using. Debian based, Red Hat based or Suse based. Several of the Linux Distributions have a Mono Project package included in their repository, but rarely the latest. So I recommend going to their site and get it.

That is really the tools you need to write .net programs for Linux on a mac. A framework developed by Microsoft to run for Windows. There are even some community packages of Mono Project out there, even linked on their website. These are usually not tested by Xamarin.

Happy cross coding!

Posted in Linux, Mac, Mono Develop Tagged with: , ,

Debian add hard drive
June 5th, 2016 by ronny

Debian add hard drive

Here I will explain Debian add hard drive. It is a little more to it than just connect the hard drive. Not much more, but a little bit more.

After you have connected the new hard drive to your Debian system and switched it on, your Debian system doesn’t know how to use your new hard drive. Debian knows it is there, but can’t use it for anything.

I have divided the process into four steps.

Debian add hard drive – Step 1

Partition your new hard drive. Even if you don’t need several partitions, you will need to create at least one partition.

Find all detected hard drives.
sudo fdisk -l | grep ‘Disk’

That will output something like this.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
Disk identifier: 0x00000000
Disk /dev/sdb: 60.0 GB, 60022480896 bytes
Disk identifier: 0x7d09ee5f

sdb is new hard drive here. A small SSD I want to run MySQL databases on.

So we know the hard drive is there. Lets create that partition.

sudo fdisk /dev/sdb

Type n to create a new partition. And accept all default values. Once all the values are accepted, type w to write the new partition table and exit. If you messed up something and don’t want to write the new partition table, type q to exit without saving any changes. Everything you do in fdisk is just saved in memory until you hit w .

Debian add hard drive – Step 2

Format the new hard drive.

Here we decided we want to use ext3 partition on our new drive.

Type in:
sudo mkfs.ext3 /dev/sdb1
(sdb1 is the new partition you created in the previous step)

Debian add hard drive – Step 3

Mount the new hard drive

We still can’t use the new hard drive until we mount it. That means we make it useable in our Debian System.

First we create a folder to mount our new hard drive to.

sudo mkdir /disk1

Then we mount sdb1 to the new folder.

sudo mount /dev/sdb1 /disk1

Now your new hard drive should be usable by the system. To verify this, type in df -h
You should find something like this:
/dev/sdb1 60G 22G 35G 39% /disk1

If you restart your system at this point, you will not see your new hard drive. That’s because we haven’t told the system to mount it automatically on boot.

Debian add hard drive – Step 4

Make the new hard drive automatically mounted on boot.

Open your /etc/fstab file. You can do that with vim, nano or some other text editor. I like vim.
sudo vim /etc/fstab

Add this to the bottom of the file.
/dev/sdb1 /disk1 ext3 defaults 1 2

Save and close the file. In vim you do that by first pressing the ESC key, and type :wq

That is how you add a new hard drive to a Debian System.

If you need to download Debian, go to this address

Happy hard driving!

Posted in Debian, Linux Tagged with: , ,

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: , ,

linux calendar
May 1st, 2016 by ronny

Linux calendar from the terminal

Linux calendar function is a neat and useful little tool. Getting the calendar directly in the terminal, if you need to, while working in the terminal.

Cal is a built in tool in bash, coming with all Linux versions. And OS X, BSD and other compatible versions of Unix. If you open your terminal and type cal, it will print this months calendar. Like in the picture below.

linux calendar

To print the calendar for the full year, there is two ways of doing that. You can type cal -y to display the current year. If you are wondering how 2025 is looking, just type cal 2025 to find that out. By the way 24th of December is on a Wednesday in 2025.

linux calendar

You can choose to display just december in 2025 instead of the whole year. Just type cal 12 2025 to display the calendar for december 2025. As shown in the picture below.

linux calendar

There is also an alternative layout. The cal function can not display week number, and we weeks always starts on Sunday. That can not be changed with parameters or attributes for the function. Where I live, Norway, weeks starts on Monday and not sunday. You can use the alternative layout to have weeks starts on monday. First lets try the alternative layout by typing ncal. This will display the alternative layout. To have the Linux calendar starts on monday, just type ncal -M. Both are displayed in the picture below.

linux calendar

How about week numbers, can Linux calendar display week numbers? Yes, but only through the altnerative layout. The cal function can not display week numbers. Lets try and see if we can get some week numbers here. Try that by type ncal -w. If you live in a part of the world where the weeks starts on Monday, type ncal -M -w to have the week starts on monday and week numbers. Check out the picture below for an example print out.

linux calendar

If you are interested in getting a weather report from linux terminal, check this out:

These examples on the screen prints was done in Debian. If you want to try out Debian, a rock solid linux distribution but not the latest apps, you can get it here:

Thats it about Linux Calendar.

Happy date!

Posted in Linux, OS X Tagged with: ,