Category Archives: Debian-Testing

How to build a vanilla kernel from kernel.org on Linux and install it properly.

How to build and install a vanilla kernel on a Linux computer.

This posting will explain how to build a vanilla kernel from kernel.org and properly install it to your Linux machine.

Getting the source code.

Firstly; download a vanilla tarball from http://www.kernel.org. I chose the 3.12-rc6 kernel tarball.

Type this command to unpack the tar.xz file: tar xpvf linux-3.12-rc6.tar.xz.

Then enter the source directory. cd linux-3.12-rc6/.

Preparing to build the source.

Ensure that the source tree is clean: make mrproper.

Then copy the default configuration from the existing kernel: cat /boot/config-`uname -r` > .config.After that you may then run make menuconfig to begin configuring the kernel. If you get an error you would need to install the ncurses-devel package.

Linux kernel 3.12 menuconfig.

Linux kernel 3.12 menuconfig.

The above screenshot shows the menuconfig window I am using to setup the Linux kernel on Debian Wheezy 7.1.

Once you are finished configuring the kernel; exit menuconfig and save your changes.

Compiling the kernel

Now you may begin compiling the kernel: make -j4 && make modules. This will use all 4 CPU cores to build the Linux kernel faster. And it will then build all required kernel modules as well. This might take quite a while; but wait a while and you will have a brand new kernel image ready to be installed.

Installing the kernel.

Once the compilation has completed install the kernel modules thusly: sudo make modules_install

That will install all of the kernel modules under a directory in /lib/modules/3.12-rc6 and perform other tasks to ensure that the modules are properly registered.

After that install the kernel image and System.map file to the /boot directory with this command: make install. Not all Linux distributions implement this properly; but this is how I install a new kernel bzImage image on Fedora 19 and Debian 7.1. Any Linux distro that does not allow you to install the kernel in the traditional fashion is not worth bothering with in my opinion.

homer@neo:/media/86c5852a-4c79-4224-b766-dd0d54eaa483/linux-work/linux-3.12-rc6$ sudo make install
sh /media/86c5852a-4c79-4224-b766-dd0d54eaa483/linux-work/linux-3.12-rc6/arch/x86/boot/install.sh 3.12.0-rc6 arch/x86/boot/bzImage \
		System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/dkms 3.12.0-rc6 /boot/vmlinuz-3.12.0-rc6
Error! Bad return status for module build on kernel: 3.12.0-rc6 (x86_64)
Consult /var/lib/dkms/virtualbox/4.1.18/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.12.0-rc6 /boot/vmlinuz-3.12.0-rc6
update-initramfs: Generating /boot/initrd.img-3.12.0-rc6
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.12.0-rc6 /boot/vmlinuz-3.12.0-rc6
run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.12.0-rc6 /boot/vmlinuz-3.12.0-rc6
P: Checking for EXTLINUX directory... found.
P: Writing config for /boot/vmlinuz-3.9-0.bpo.1-amd64...
P: Writing config for /boot/vmlinuz-3.2.0-4-amd64...
P: Writing config for /boot/vmlinuz-3.12.0-rc6...
P: Updating /boot/extlinux/linux.cfg...
P: Writing config for Windows 8 (loader) on /dev/sda2...
P: Installing debian theme... done.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.12.0-rc6 /boot/vmlinuz-3.12.0-rc6
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.12.0-rc6
Found initrd image: /boot/initrd.img-3.12.0-rc6
Found linux image: /boot/vmlinuz-3.9-0.bpo.1-amd64
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Found Windows 8 (loader) on /dev/sda2
done

After this; re-boot your machine and boot into your new kernel!

How to use the host command to get information about a host and do a reverse IP lookup.

This is how to get IP address information for a host. The host command is very useful for performing a DNS lookup.

homer@neo:~$ host yahoo.com
yahoo.com has address 206.190.36.45
yahoo.com has address 98.139.183.24
yahoo.com has address 98.138.253.109
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.

This is how to get the domain IP address.

homer@neo:~$ host -t a yahoo.com
yahoo.com has address 98.139.183.24
yahoo.com has address 206.190.36.45
yahoo.com has address 98.138.253.109

Find out the domain mail server(s) with this command.

homer@neo:~$ host -t mx yahoo.com
yahoo.com mail is handled by 1 mta5.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta7.am0.yahoodns.net.
yahoo.com mail is handled by 1 mta6.am0.yahoodns.net.

Find out the domain name servers for the address this way. Here is the output you should get.

homer@neo:~$ host -t ns yahoo.com
yahoo.com name server ns1.yahoo.com.
yahoo.com name server ns8.yahoo.com.
yahoo.com name server ns4.yahoo.com.
yahoo.com name server ns3.yahoo.com.
yahoo.com name server ns6.yahoo.com.
yahoo.com name server ns2.yahoo.com.
yahoo.com name server ns5.yahoo.com.

Get all pertinent information about a host this way. This gives you the host IP addresses and the name servers.

homer@neo:~$ host -a nsa.gov
Trying "nsa.gov"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28754
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;nsa.gov.			IN	ANY

;; ANSWER SECTION:
nsa.gov.		299	IN	A	65.196.127.226
nsa.gov.		299	IN	A	65.196.127.225
nsa.gov.		3599	IN	MX	20 emvm-gh1-uea09.nsa.gov.
nsa.gov.		3599	IN	MX	20 emvm-gh1-uea08.nsa.gov.
nsa.gov.		21599	IN	NS	dsdn-gh1-uea05.nsa.gov.
nsa.gov.		21599	IN	NS	dsdn-gh1-uea06.nsa.gov.
nsa.gov.		21599	IN	SOA	dsdn-gh1-uea05.nsa.gov. please_set_email.absolutely.nowhere. 2011061486 10800 3600 2419200 900

Received 248 bytes from 192.168.1.1#53 in 376 ms

Reverse IP lookup with the host command.

homer@neo:~$ host 82.98.86.176
176.86.98.82.in-addr.arpa domain name pointer ironman3.com.

To show how names are resolved using name servers, use the dig command with the +trace parameter to trace the path to the target.

homer@neo:~$ dig +trace yahoo.com

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> +trace yahoo.com
;; global options: +cmd
.			5476	IN	NS	a.root-servers.net.
.			5476	IN	NS	b.root-servers.net.
.			5476	IN	NS	c.root-servers.net.
.			5476	IN	NS	d.root-servers.net.
.			5476	IN	NS	e.root-servers.net.
.			5476	IN	NS	f.root-servers.net.
.			5476	IN	NS	g.root-servers.net.
.			5476	IN	NS	h.root-servers.net.
.			5476	IN	NS	i.root-servers.net.
.			5476	IN	NS	j.root-servers.net.
.			5476	IN	NS	k.root-servers.net.
.			5476	IN	NS	l.root-servers.net.
.			5476	IN	NS	m.root-servers.net.
;; Received 228 bytes from 192.168.1.1#53(192.168.1.1) in 520 ms

com.			172800	IN	NS	a.gtld-servers.net.
com.			172800	IN	NS	b.gtld-servers.net.
com.			172800	IN	NS	c.gtld-servers.net.
com.			172800	IN	NS	d.gtld-servers.net.
com.			172800	IN	NS	e.gtld-servers.net.
com.			172800	IN	NS	f.gtld-servers.net.
com.			172800	IN	NS	g.gtld-servers.net.
com.			172800	IN	NS	h.gtld-servers.net.
com.			172800	IN	NS	i.gtld-servers.net.
com.			172800	IN	NS	j.gtld-servers.net.
com.			172800	IN	NS	k.gtld-servers.net.
com.			172800	IN	NS	l.gtld-servers.net.
com.			172800	IN	NS	m.gtld-servers.net.
;; Received 487 bytes from 128.63.2.53#53(128.63.2.53) in 17306 ms

yahoo.com.		172800	IN	NS	ns1.yahoo.com.
yahoo.com.		172800	IN	NS	ns5.yahoo.com.
yahoo.com.		172800	IN	NS	ns2.yahoo.com.
yahoo.com.		172800	IN	NS	ns3.yahoo.com.
yahoo.com.		172800	IN	NS	ns4.yahoo.com.
;; Received 197 bytes from 192.55.83.30#53(192.55.83.30) in 6259 ms

yahoo.com.		1800	IN	A	206.190.36.45
yahoo.com.		1800	IN	A	98.139.183.24
yahoo.com.		1800	IN	A	98.138.253.109
yahoo.com.		172800	IN	NS	ns6.yahoo.com.
yahoo.com.		172800	IN	NS	ns8.yahoo.com.
yahoo.com.		172800	IN	NS	ns1.yahoo.com.
yahoo.com.		172800	IN	NS	ns2.yahoo.com.
yahoo.com.		172800	IN	NS	ns3.yahoo.com.
yahoo.com.		172800	IN	NS	ns4.yahoo.com.
yahoo.com.		172800	IN	NS	ns5.yahoo.com.
;; Received 313 bytes from 68.142.255.16#53(68.142.255.16) in 171 ms

My system information program I coded for Linux a while ago. This works very well.

http://www.securitronlinux.com/files/sysinfo.kdevelop-1.0.tar.bz2. This is my system information program I coded for Linux. This gives a bit of information about your Linux system. Just download and unpack this tarball and type make to compile.

Here is some sample output.

13:21:02 ~/Downloads/sysinfo.kdevelop-1.0 homer@neo $ ./sysinfo 1
--System name - Linux 
--Nodename    - neo.deusexmachina 
--Release     - 3.9.5-301.fc19.x86_64 
--Version     - #1 SMP Tue Jun 11 19:39:38 UTC 2013 
--Machine     - x86_64

Here I am getting information about the CDROM drive I have.

13:24:57 ~/Downloads/sysinfo.kdevelop-1.0 homer@neo $ ./sysinfo 3
Cdrom drive information.
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name:		sr0
drive speed:		125
drive # of slots:	1
Can close tray:		1
Can open tray:		1
Can lock tray:		1
Can change speed:	1
Can select disk:	0
Can read multisession:	1
Can read MCN:		1
Reports media changed:	1
Can play audio:		1
Can write CD-R:		1
Can write CD-RW:	1
Can read DVD:		1
Can write DVD-R:	1
Can write DVD-RAM:	1
Can read MRW:		0
Can write MRW:		0
Can write RAM:		1

Here I am getting information about the soundcard on a Debian 7.1 machine.

homer@neo:~/sysinfo.kdevelop-1.0$ ./sysinfo 4
		Sound Card information.
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xb4400000 irq 41
1
		SCSI device information.
Sorry, I cannot open: /proc/scsi/scsi.
Please check your permissions with
your supervisor. The feature may not
be compiled and\or enabled in your
kernel version. Or a scsi device, eg,
a USB drive may not be attached.

Check this program out for yourself and see what you think of it. Suggestions for improvements are welcome.

How to renew your network interface IP address on Linux with the dhclient command.

The dhclient command on Linux is used to renew an IP address for a network interface. Here i am using Fedora 19 with the new standardised network interface names.

root@neo homer# dhclient -v wlp0s26f7u5
Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlp0s26f7u5/e0:91:f5:23:fd:ad
Sending on   LPF/wlp0s26f7u5/e0:91:f5:23:fd:ad
Sending on   Socket/fallback
DHCPDISCOVER on wlp0s26f7u5 to 255.255.255.255 port 67 interval 4 (xid=0x3791798e)
DHCPREQUEST on wlp0s26f7u5 to 255.255.255.255 port 67 (xid=0x3791798e)
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1 (xid=0x3791798e)
bound to 192.168.1.3 -- renewal in 41575 seconds.

This command will attempt to set a new IP address for your network adapter.

Here is another example of the usage of this command.

Stopping the network interface.

homer@hal9000:~$ sudo dhclient -r
avahi-daemon start/running, process 2643

Checking that we have no IP address now.

homer@hal9000:~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 08:00:27:85:68:81  
          inet6 addr: fe80::a00:27ff:fe85:6881/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:0
          TX packets:93 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6987 (6.9 KB)  TX bytes:12712 (12.7 KB)
          Interrupt:19 Base address:0xd000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:868 (868.0 B)  TX bytes:868 (868.0 B)

Bringing the network interface back up.

homer@hal9000:~$ sudo dhclient eth0
avahi-daemon stop/waiting

And checking the IP address again gives us what we want.

homer@hal9000:~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 08:00:27:85:68:81  
          inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe85:6881/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:58 errors:0 dropped:0 overruns:0 frame:0
          TX packets:105 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8093 (8.0 KB)  TX bytes:14235 (14.2 KB)
          Interrupt:19 Base address:0xd000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:28 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2124 (2.1 KB)  TX bytes:2124 (2.1 KB)

Another way is to use the ipfdown command to bring down the network interface.

homer@hal9000:~$ sudo ifdown eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/08:00:27:85:68:81
Sending on   LPF/eth0/08:00:27:85:68:81
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.1.1 port 67 (xid=0x69c9cbce)
avahi-daemon start/running, process 3209

And then it will not be active.

homer@hal9000:~$ ifconfig 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:108 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:8404 (8.4 KB)  TX bytes:8404 (8.4 KB)

Then bring it back up with the ifup command and it will be assigned an IP address.

homer@hal9000:~$ ifconfig 
eth0      Link encap:Ethernet  HWaddr 08:00:27:85:68:81  
          inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe85:6881/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:111 errors:0 dropped:0 overruns:0 frame:0
          TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:15329 (15.3 KB)  TX bytes:21615 (21.6 KB)
          Interrupt:19 Base address:0xd000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:124 errors:0 dropped:0 overruns:0 frame:0
          TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:9660 (9.6 KB)  TX bytes:9660 (9.6 KB)

This is not too difficult at all.

Another way to get information about your laptop battery when you are running Linux.

This command: upower -i /org/freedesktop/UPower/devices/battery_BAT0 will give you information about your laptop battery.

homer@neo:~/Documents$ upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:0c/PNP0C0A:00/power_supply/BAT0
  vendor:               PANASONIC
  model:                Li_Ion_4000mA
  serial:               0000
  power supply:         yes
  updated:              Sun Sep 29 02:39:34 2013 (3 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    energy:              27.2484 Wh
    energy-empty:        0 Wh
    energy-full:         45.414 Wh
    energy-full-design:  47.52 Wh
    energy-rate:         15.984 W
    voltage:             10.862 V
    time to empty:       1.7 hours
    percentage:          60%
    capacity:            95.5682%
    technology:          lithium-ion
  History (charge):
    1380386343	60.000	discharging
  History (rate):
    1380386374	15.984	discharging
    1380386343	16.351	discharging
    1380386312	16.243	discharging
    1380386281	17.528	discharging

Use grep with this command to see if you are connected to the power or the laptop is using the battery.

homer@neo:~/Documents$ upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state:
    state:               discharging

You may also use the acpi command to get information about your laptop battery.

homer@neo:~/Documents$ acpi
Battery 0: Discharging, 52%, 01:27:04 remaining

These are very useful commands to know when you are using a laptop with Linux. Making it very easy to get information about your laptop hardware.

Here is a way to see if the laptop is open or shut.

homer@neo:~/Documents$ cat /proc/acpi/button/lid/LID0/state 
state:      open

I guess this could be useful if you are connecting to the laptop with SSH.

How to prevent a file from being overwritten using the tcsh shell on Linux.

This example using the set noclobber command prevents existing files from being overwritten.

9:18am homer /home/homer/Documents ) set noclobber
9:18am homer /home/homer/Documents ) ls ip.txt
ip.txt
9:18am homer /home/homer/Documents ) echo "hello" > ip.txt
ip.txt: File exists.

But you can still erase the file with the rm command.

           
9:20am homer /home/homer/Documents ) rm ip.txt
11:27pm homer /home/homer/Documents ) ls ip.txt
ls: cannot access ip.txt: No such file or directory

This is how to override this setting if need be. Use the echo “hello” >! ip.txt command to force a write to an existing file.

11:46pm homer /home/homer/Documents ~/Documents> echo "hello" > ip.txt
11:46pm homer /home/homer/Documents ~/Documents> echo "hello" > ip.txt
ip.txt: File exists.
11:46pm homer /home/homer/Documents ~/Documents> echo "hello" >! ip.txt

This is how I got my awesome tcsh shell prompt. This one is rather nice.

set prompt = "%t %n %/ %~%# "

Get more information about the tcsh shell here: http://www.acm.uiuc.edu/workshops/cool_unix/tcsh-startup.html.

How to easily create a bash shell prompt for your personal use using a website interface.

The bash $PS1 generator here: http://www.kirsle.net/wizards/ps1.html allows you to create a cool bash shell prompt with a minimum of fuss. You can add colors to various parts of the prompt and make it look very nice indeed. Check it out now and see what you think.

Here is one that I made. This uses tput to set colors instead of using escape sequences. This is better practice it seems.

# Custom bash prompt via kirsle.net/wizards/ps1.html
export PS1="\[$(tput bold)\]\[$(tput setaf 6)\]\t \u@\h \W \\$:>\[$(tput sgr0)\]"

There is another website that allows the creation of a bash shell prompt: http://ezprompt.net/. This one uses the older escape sequences instead of tput; but it is also a very good website.

If you want a simple drag and drop method of creating a useful bash shell prompt for Macintosh and Linux computers, then this website is excellent: http://xta.github.io/HalloweenBash/. This website lets you use simple drag and drop to create a complex bash prompt. The way this works is by dragging and dropping blocks to create the prompt. Very easy to use.

Happy 20th birthday to Debian. The distribution that spawned Ubuntu and Linux Mint.

Debian Linux. 20 years and still going strong.

This Linux distribution was started by Ian Murdock. He named Debian after his then-girlfriend Debra Lynn, therefore the distribution gained the name of Debian. Nowadays with the many derived distributions that use the Debian apt packaging system; the legacy of this distribution will live on long after the anniversary. We will not see the end of the Debian distribution anytime soon; with the rise in popularity of the Rasberry Pi there is renewed interest in using Debian on a small integrated device. The future of Linux is looking very bright indeed, the hobbyist market loves to create new technology using small cheap computers and Linux is the ideal way to power them.

So happy birthday Debian and I hope to see the 30th anniversary as well.

http://bits.debian.org/2013/08/20-birthday-debian.html.

Useful applications and extensions for doing a WIFI site survey on Linux.

WIFI Scanner application working on Debian 7.0

WIFI Scanner application working on Debian 7.0

The WIFI Scanner application for Linux allows you to perform a WIFI site survey to test signal strength when deploying a wireless setup. This is very useful; you can walk around the building and see the signal strength to determine whether you should tweak the transmit power or add more wireless access points to improve the coverage of the wireless network. Type sudo apt-get install wifi-radar to install this useful utility. Another useful way to see what WIFI networks are near you and what the MAC addresses of the Access Points are is to install the WIFI Finder extension for Firefox. This will list all wireless networks in your vicinity.

If you wish to know the MAC address of the network Access Point that you are connected to; then run the iwconfig command as root. This will give you this information.

root@neo:/home/homer# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"MyWIFI8201"  
          Mode:Managed  Frequency:2.462 GHz  Access Point: 84:C9:B2:BD:C2:E8   
          Bit Rate=72.2 Mb/s   Tx-Power=13 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=64/70  Signal level=-46 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:84   Missed beacon:0

Then you can Google search the MAC address and try and find out what model number the Access Point is. If you are wanting to use your Google Android mobile telephone to do a site survey; then the WIFI Analyser app will do a very good job. This has many features for determining signal strength and coverage of your wireless network. See it here on Google Play: https://play.google.com/store/apps/details?id=com.farproc.wifi.analyzer&hl=en. This shows many graphs and indicators of signal strength and the most used WIFI channels in your area. These utilities should be perfect for a WIFI site survey and using Linux is cooler than Windows. If you are using an Apple iPhone or iPad, there is also this app that allows you to perform a WIFI site survey: https://itunes.apple.com/us/app/wifi-survey/id442777657?mt=8.

How to install the gcj Java compiler on Debian 7.0 and compile a simple program.

This is how to compile a Java source file on Linux with gcj.

homer@neo:~/Documents$ gcj --main=HelloWorld HelloWorld.java

This is the source file that I am working with.

/*
 * My first Java program.
 *
 */

import java.util.Date;

public class HelloWorld {

	public static void main(String[] args) {

		System.out.printf("\"Hello, World\"\n");
		Date date = new Date();

		System.out.println("The date is: " + date.toString() + ".");
	}

}

And after I have compiled the program, I can run it by typing ./a.out and I will see the output.

homer@neo:~/Documents$ ./a.out 
"Hello, World"
The date is: Sat Aug 10 00:16:15 AEST 2013.

And this is how to install the gcj Java compiler on Debian 7.0.

sudo apt-get install gcj-4.6-jre

homer@neo:~$ sudo apt-get install gcj-4.6-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcj-4.6-jre is already the newest version.
The following packages were automatically installed and are no longer required:
  libossp-uuid16 libpq5 postgresql-client-common postgresql-common timelimit
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 118 not upgraded.

Some very useful online Linux resources.

http://www.scribd.com/doc/12918020/Linux-Starter-Pack; The Linux starter pack. This is very good as an introduction to the Linux desktop and the various utilities available.

http://tille.garrels.be/training/bash/; Introduction to Linux guide for beginners. This is a good resource if you want to learn more about the Linux shell and usage in general.

http://securitron.securitronlinux.com/lc/rute/; Rute User’s Tutorial and Exposition. The definitive Linux resource for new users. This is the best resource for learning about PC hardware, Linux shell and useful commands.

http://en.flossmanuals.net/; FLOSS manuals. A website with many manuals for Free Linux Open Source Software.

http://www.advancedlinuxprogramming.com/alp-folder/; The Advanced Linux Programming manual.

http://linux-training.be/files/books/LinuxFun.pdf; Linux Fundamentals. An excellent Linux resource for anyone who is using this free and open desktop OS.

http://www.tldp.org/LDP/intro-linux/intro-linux.pdf; The Linux Documentation project – Introduction to Linux. A good read for those users that are new to Linux.

How to install an anti-virus product for your Linux computer to protect any Windows machines from viruses.

Installation of Anti Virus software for Linux. This is to protect Windows users who are connecting to the Linux server to get files. This posting describes the installation and configuration of an Anti Virus product for Linux. I have chosen the Clamav Anti Virus product for x86 Linux. This Anti-Virus product is installed on a Debian based system with this command:

sudo apt-get install clamav clamav-base

.

This will install the Clamav product and enable the virus protection service on the Linux computer. This is very useful for protecting users of the Linux file server from any infected files that were put there by employees. This software will run automatically in the background and scan files to prevent infection of Windows clients that are accessing the Linux file server. This Anti-Virus product is not very difficult to use and will give protection to Windows computers from any malicious software and viruses that are resident in the files on the shared folder. Clamav does not use much memory and is very reliable. I wanted to install the Mcafee anti-virus and give that a try on Linux, but that is not as easy as installing Clamav.

Type clamscan to run a scan of a directory on your Linux system.

homer@neo:~$ clamscan 
/home/homer/.gksu.lock: Empty file
/home/homer/.pulse-cookie: OK
/home/homer/.ICEauthority: OK
/home/homer/.profile: OK
/home/homer/.xdvirc: OK
/home/homer/.gtk-bookmarks: OK
/home/homer/.bashrc: OK
/home/homer/.viminfo: OK
/home/homer/.bash_logout: OK
/home/homer/.xsession-errors.old: OK
/home/homer/.bash_history: OK
/home/homer/partitions.txt: OK
/home/homer/.mysql_history: OK
/home/homer/file1.txt: OK
/home/homer/.vimrc: OK
/home/homer/.fehbg: OK
/home/homer/moodle.sql: OK
/home/homer/.xsession-errors: OK

----------- SCAN SUMMARY -----------
Known viruses: 2399132
Engine version: 0.97.8
Scanned directories: 1
Scanned files: 17
Infected files: 0
Data scanned: 3.48 MB
Data read: 1.20 MB (ratio 2.89:1)
Time: 6.905 sec (0 m 6 s)

To install the Clamav definitions database on Linux type this command.

sudo freshclam

This will download and install the newest versions of the virus definitions database. This is how easy it is to install a virus scanner on Linux.

homer@neo:~$ sudo freshclam
[sudo] password for homer:
ClamAV update process started at Sat Jun 22 04:58:49 2013
WARNING: DNS record is older than 3 hours.
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Downloading main.cvd [100%]
main.cvd updated (version: 54, sigs: 1044387, f-level: 60, builder: sven)
Downloading daily.cvd [100%]
daily.cvd updated (version: 17385, sigs: 1360120, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 214, sigs: 41, f-level: 63, builder: neo)
Database updated (2404548 signatures) from db.local.clamav.net (IP: 117.104.160.194)

International Space Station switches to Debian 6.0 instead of Windows XP.

ISS crewman using a Linux Thinkpad with a cool Star Trek wallpaper.

ISS crewman using a Linux Thinkpad with a cool Star Trek wallpaper.

The International Space Station has migrated all of its computers from Windows XP to Debian GNU/Linux 6.0. This will greatly add to the security of the computers on the ISS and although it requires retraining Cosmonauts in the use of the computers; this will have many benefits in the long run. Linux is more secure and reliable than Windows and this is a good move by the people in charge. Even with Service pack 3 installed; Windows XP is too susceptible to viruses and malware. Better to run an open-source operating system that allows the crew to re-write sections of the operating system themselves and patch software the same way. This is the true spirit of open-source software and ensures that Linux will become more popular than ever before. The proprietary software that the crew of the International Space Station was using on Windows XP was easily ported to Linux with a re-write and then they could use it on Linux. This is a win for Linux and shows that Microsoft do not have a monopoly on every market. They will have to improve the quality of their software and operating systems before everyone will trust it. That is the key. But they drastically changed the Windows interface in Windows Server 2012 and Windows 8. That has caused a less than stunning uptake of Windows 8 installations around the world. If even the crew of the ISS will not use Windows; then it looks like a bright future for Debian Linux.

A view of the now Linux powered International Space Station.

A view of the now Linux powered International Space Station.

I am using Debian GNU/Linux 7.0 on my laptop and I got Apache2 and MySQL working very easily without any fuss. Much easier than setting up a web server on Windows. Unless you are using IIS on Windows 2008 or 2012. But Linux has a long heritage as a server operating system and this makes it a better choice. The nature of the scientific work carried out on the International Space Station requires a computer system that is very stable with long uptime. Linux is perfect for this; it is very stable by default. They use Scientific Linux as well as Debian; the various distributions are perfectly suited for certain tasks. Some other computers run the Red Hat Linux distribution. The Large Hadron particle collider that is run by CERN uses Linux and the robot on the ISS is also powered by a Linux distribution. The International Space Station crew will be trained by the Linux Foundation in the use of the Linux machines and they will then be able to run their experiments easily with a stable and reliable desktop OS that is easily programmable with the Python, Perl and C programming languages that are easily installed on Linux. The Universe that we inhabit is an amazing one with many sights out there that are worth the trip if we ever develop the technology to travel to other planets. Read more about our Universe here: http://www.securitronlinux.com/uncategorized/amazing-facts-about-the-universe-we-live-in/.

The new Debian 7.0 distribution really is an awesome desktop Linux distribution.

I have just started using the Debian 7.0 distribution after installing it today on my laptop and it is an extremely good Linux distribution that has codecs already installed allowing the user to play Xvid and MP3 formats straight out of the box. The installation was quite painless; I had used up all of the other partitions on my laptop with Windows stuff; so I used the recovery partition instead. I just needed to resize a partition to make way for the swap partition and I was all set. The Gnome 3 desktop is very fast and usable; I had a look at a Red Hat Enterprise Linux desktop today and it was the old Gnome 2.32.2 desktop. That was a very nostalgic moment. But despite the dumbed down interface; it is very fast and usable when you are on a laptop. The Debian 7.0 distribution is easy to setup after installation. I only needed to enable the http repositories and then run apt-get update to update the repositories information.

This is what my /etc/apt/sources.list file looks like now.

# 

# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main

deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main


# wheezy-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://ftp.debian.org/debian/ wheezy-updates main contrib
deb http://http.us.debian.org/debian/ wheezy contrib main
deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib

And this is how to update the apt repository information on Debian based distributions.

root@neo:/home/homer/Documents# apt-get update
Ign cdrom://[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44] wheezy Release.gpg
Ign cdrom://[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44] wheezy Release
Ign cdrom://[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44] wheezy/contrib amd64 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44] wheezy/main amd64 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44] wheezy/contrib Translation-en_AU
Ign cdrom://[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44] wheezy/main Translation-en_AU
Get:1 http://http.us.debian.org wheezy Release.gpg [1,672 B]                                        
Hit http://ftp.debian.org wheezy-updates Release.gpg                                                
Get:2 http://http.us.debian.org wheezy Release [159 kB]
Hit http://ftp.debian.org wheezy-updates Release      
Hit http://ftp.debian.org wheezy-updates/main Sources 
Hit http://ftp.debian.org wheezy-updates/contrib Sources
Hit http://ftp.debian.org wheezy-updates/main amd64 Packages
Hit http://ftp.debian.org wheezy-updates/contrib amd64 Packages
Get:3 http://http.us.debian.org wheezy/contrib amd64 Packages [42.0 kB]
Get:4 http://http.us.debian.org wheezy/main amd64 Packages [5,846 kB]  
Hit http://ftp.debian.org wheezy-updates/contrib Translation-en
Hit http://ftp.debian.org wheezy-updates/main Translation-en
Get:5 http://http.us.debian.org wheezy/contrib Translation-en [34.8 kB]                                                                         
Get:6 http://http.us.debian.org wheezy/main Translation-en [3,851 kB]                                                                           
Fetched 9,935 kB in 58s (170 kB/s)                                                                                                              
Reading package lists... Done

Once this is done you will be able to install any software that you wish to add. I am in Australia; so this should be using Australian repositories; but it really does not matter. The only other thing that I needed to do was set the time and then mount my Windows partiton to access my music.

Gnome Shell time/date settings.

Gnome Shell time/date settings.

Setting up the Gnome desktop is very easy; but there are other desktops available. I could not find the E17 desktop; but Xfce4 and Lxde are alternatives that would make any desktop user happy.