Archive for the ‘Linux-Mint’ Category:

Updating the grub2 boot-loader menu & adding swap space to your computer.

To update the grub bootloader on your Linux box, this is another way to do this.

grub-mkconfig > /boot/grub/grub.cfg

This will update the grub2 bootloader and add any new kernels in /boot.

Creating a new swapfile for your Linux system.

Firstly we create a new file padded with zeros from /dev/zero.

[email protected]:~# dd if=/dev/zero of=swafile bs=1024 count=524288
524288+0 records in
524288+0 records out
536870912 bytes (537 MB) copied, 2.20969 s, 243 MB/s

Then we enable the file as swap space with the mkswap command.

[email protected]:~# mkswap swafile 

Setting up swapspace version 1, size = 524284 KiB
no label, UUID=f29c3acc-9deb-4213-9350-30cccc455f37

Finally, we enable the new swap space as a swap partition, making it available to the system.

[email protected]:~# swapon swafile

To switch off this new swapfile, you may use the swapoff command to switch it off

[email protected]:~# swapoff swafile

This is the output of the free command with the swapfile turned on.

[email protected]:~# free
             total       used       free     shared    buffers     cached
Mem:       5915844    5875940      39904          0    1950988    3376980
-/+ buffers/cache:     547972    5367872
Swap:      5036020          4    5036016
[email protected]:~#

And this is the output with the swapfile turned off with the swapoff command.

[email protected]:~# free
             total       used       free     shared    buffers     cached
Mem:       5915844    5848000      67844          0    1942792    3358896
-/+ buffers/cache:     546312    5369532
Swap:      4511736          4    4511732
[email protected]:~#

How to disable desktop icons on the Linux Mint MATE desktop. Very easy with the Configuration Editor.

Remove the icons from the Linux Mint MATE desktop.

This post will tell you how to disable the desktop icons on the Linux Mint MATE desktop. I prefer to have the desktop this way as it is a little faster and better looking. Just go to Applications->System->Configuration Editor in the MATE Menu as shown above. Or System Tools->Configuration editor if you are using the standard Mint menu. This will also work with Ubuntu if the MATE desktop is installed instead of KDE or Unity.

Opening the MATE configuration editor.

Opening the MATE configuration editor.

Then navigate the tree to apps/caja/preferences and untick the show desktop button and the icons will disappear. Of course you may simply reverse this procedure to re-enable the desktop icons. This will make your MATE desktop slightly faster. Then you will have nothing obscuring the desktop wallpaper. Due to a bug that is still present from Gnome 2.32.2, you will need to re-enable the desktop icons to change the wallpaper. Apart from KDE 4.8.3, the MATE desktop is the best modern Linux desktop and little tweaks like this make it better still. The MATE desktop offers the most freedom to customize your desktop and layout to suit whatever you are using it for. That is why Linux is better than Windows. Windows 8 will let you change themes; I had a Macintosh OSX theme installed. But you can do that with MATE as well. And you do not need to worry about the many bugs that are present in Windows 8. Linux offers open-source software that will do exactly what you wish it to without any hassles. Having the desktop laid out exactly the way you want does help with productivity.

Disabling the show desktop icons option.

Disabling the show desktop icons option.

There is now another way to do this, using the MATE Tweak Tool. This allows the user to remove desktop icons with a single click.
Install the mate-tweak utility.

sudo apt install mate-tweak

Then run it from the terminal

mate-tweak &
The mate-tweak utility for Linux. Turning off desktop icons.

The mate-tweak utility for Linux. Turning off desktop icons.

More information on this cool little app: http://www.securitronlinux.com/bejiitaswrath/tweak-your-linux-mint-mate-desktop-with-this-useful-app/.

More information: http://mate-desktop.org/. There are also some incredible themes available for the MATE desktop; these are well worth installing to make your desktop stand out from the crowd.

How to use xrdp on Linux Mint 15 to allow remote desktop connections from Windows 8.

How to remote desktop into a Linux desktop with the xrdp command

Very easy when you use xrdp.

Remote desktop connection to a Linux desktop.

Remote desktop connection to a Linux desktop.

This is how to use the Windows 8 Remote Desktop client to connect to a Linux machine running Linux Mint 8. This is a way to remotely control a Linux machine with a graphical desktop. This makes remote administration of the Linux server or desktop very easy indeed. Although, it would be best to use a VPN connection if you are accessing a machine like this over the Internet for the greatest level of security.

To install the xrdp server on my computer, I used this command.

sudo apt-get install xrdp

This installed the xrdp server. Then I had to create an ~/.xsession file to define the desktop that the xrdp server would display to a client.

Type this command

sudo apt-get install fluxbox

and then add this to the ~/.xsession file using this command.

echo "gnome-session-fallback" > ~/.xsession

This will create the .xsession file that you need. Once this is all ready; open the Remote Desktop dialog and type in the IP address of your Linux box. You might get this error when you use the Windows RDP application to connect to your Linux machine. You may not need to do this though, this is optional. And this may not work very well on Windows 8. Not tested on Windows 10.

Windows Remote Desktop message.

Windows Remote Desktop message.

This is nothing to worry about. Just click Yes and then connect to your Linux box.

Windows 8 Remote Desktop dialog.

Windows 8 Remote Desktop dialog.

This screenshot below is what the xrdp login dialog looks like. This is a very easy to use remote desktop solution for Ubuntu and Linux Mint. allowing users to administer a Linux box from a Windows laptop. You can also use Putty to access the Linux server; this may be downloaded here: http://www.chiark.greenend.org.uk/~sgtatham/putty/. But the remote desktop system allows easy display of graphical windows.

xrdp prompting for the login credentials.

xrdp prompting for the login credentials.

So give this a try and see how you go on your own LAN. This is a good way to administer a Linux machine using the graphical desktop. I used the gnome-session-fallback desktop over a LAN with the RDP application and it worked quite well, but videos were a bit slow. You need to use the .xsession file to specify which desktop is loaded in the xrdp session. This is a good way to choose a suitable desktop for RDP. But this really does work. I just tried this again on my Debian 7.1 laptop and it loaded the Xfce4 desktop by default; therefore I defined the gnome-session fallback environment instead. This is a good way to control your PC remotely.

RDP into a Windows machine from Linux with the Remmina RDP client

There is also a way to RDP to Windows from Linux using the Remmina client. This will be very useful for controlling a Windows computer from a Linux box. This also works very well.

But the xrdp system is a good way to remotely administer a computer and show off the capabilities of Linux. So give this a go and see how useful it is to access your Linux desktop from a Windows machine.

http://www.securitronlinux.com/ubuntu-2/how-to-remote-desktop-to-windows-from-linux-using-the-remmina-client/. This is a very useful Remote Desktop client for Ubuntu and Linux Mint. Easy way to connect to a Windows machine to perform remote administration tasks.

Remmina RDP client.

Remmina RDP client.

This way, controlling a Windows machine from a Linux box is also possible. A very nice solution for remote Windows Server administration. Sure, you can use the Server Manager on a Windows Server machine to remotely control another Windows Server box, but the Remote Desktop utility is still a widely used tool.

Linux Mint 18 “Sarah” Xfce released!

The team is proud to announce the release of Linux Mint 18 “Sarah” Xfce Edition.

Linux Mint 18 Sarah Xfce Edition

Linux Mint 18 is a long term support release which will be supported until 2021. It comes with updated software and brings refinements and many new features to make your desktop even more comfortable to use.

New features:

This new version of Linux Mint contains many improvements.

For an overview of the new features please visit:

What’s new in Linux Mint 18 Xfce“.

Important info:

The release notes provide important information about known issues, as well as explanations, workarounds and solutions.

To read the release notes, please visit:

Release Notes for Linux Mint 18 Xfce

System requirements:

  • 512MB RAM (1GB recommended for a comfortable usage).
  • 9GB of disk space (20GB recommended).
  • 1024×768 resolution (on lower resolutions, press ALT to drag windows with the mouse if they don’t fit in the screen).

Notes:

  • The 64-bit ISO can boot with BIOS or UEFI.
  • The 32-bit ISO can only boot with BIOS.
  • The 64-bit ISO is recommend for all modern computers (Almost all computers sold in the last 10 years are equipped with 64-bit processors).

Upgrade instructions:

  • If you are running the BETA, click the refresh button in your Update Manager and apply any outstanding level 1 updates. Note also that samba was removed in the stable release as it negatively impacted boot speed. To remove samba, open a terminal and type “apt purge samba”.
  • If you are running Linux Mint 17, 17.1, 17.2 or 17.3, please follow this tutorial.

Download links:

Here are the download links for the 64-bit ISO:

A 32-bit ISO image is also available at https://www.linuxmint.com/download_all.php.

Integrity and authenticity checks:

Once you have downloaded an image, please verify its integrity and authenticity.

Anyone can produce fake ISO images, it is your responsibility to check you are downloading the official ones.

Enjoy!

We look forward to receiving your feedback. Thank you for using Linux Mint and have a lot of fun with this new release!

Linux Mint tips and tricks for making the best use of your system.

How to upgrade to a newer Linux Mint release.

https://community.linuxmint.com/tutorial/view/2.

How to update and upgrade your packages.

Type this in a terminal window.

sudo apt-get update && sudo apt-get upgrade

This command will update the package repositories and download and install package updates over the Internet.

Find a nice apt tutorial here: http://securitronlinux.com/lc/13_apt_dpkg_tutorial.pdf.

Linux Mint Cinnamon users guide. Very useful for new Linux Mint users: http://www.securitronlinux.com/debian-testing/linux-mint-users-guide-very-useful-for-all-linux-mint-fans/.

Install new themes from the Internet on Linux Mint.

There is a good selection of Linux Mint themes here: http://www.securitronlinux.com/bejiitaswrath/lovely-gtk-themes-for-the-linux-mint-mate-desktop/.

I clicked the option on this window:

Linux Mint MATE themes chooser.

Linux Mint MATE themes chooser.

But when I clicked one of the links on the page that opened, I got an error that I did not have authorization. But the main themes page is here: https://www.gnome-look.org/browse/ord/latest/. Just download a theme and place it under the ~/.themes directory and the theme will be selectable in the theme chooser dialog. Place icon themes under the ~/.icons directory.

A short GIF showing how to change Linux Mint themes.

GIF showing how to change wallpapers in Linux Mint.

GIF showing how to change wallpapers in Linux Mint.

Glances. A nice new networking script for Linux that runs on Python.

Glances is a very detailed script that will print out comprehensive information about your Linux workstation or server. To install the Glances script clone the git repository this way.

[email protected]:~$ git clone https://github.com/nicolargo/glances.git
Cloning into 'glances'...
remote: Counting objects: 13758, done.
remote: Total 13758 (delta 0), reused 0 (delta 0), pack-reused 13758
Receiving objects: 100% (13758/13758), 20.00 MiB | 257.00 KiB/s, done.
Resolving deltas: 100% (9568/9568), done.
Checking connectivity... done.

On Ubuntu 16.04 I had to run this command to install a dependency.

[email protected]:~/glances$ sudo apt-get install python-setuptools

Then I installed it thusly.

cd glances/
[email protected]:~/glances$ sudo ./setup.py install

After this is complete, just run the glances command and it will open as shown in the screenshot below.

Glances system information script running.

Glances system information script running.

The processes are color coded, they are green by default and turn red when CPU usage for example goes over a certain threshold. CPU, memory and swap information is shown, as you can see, there is very little swap usage, if any with 12 gigabytes of RAM.

The free space on mounted file-systems is also shown, and this is also color coded. It is obvious that a DVD movie has no free space :).

Networking information is available and this is useful for watching network throughput in real time.

Warnings and critical alerts will be shown if they crop up, but the only thing I saw was a process that spiked to 105% CPU usage and then went back down.

Running glances with the -t parameter will specify an update interval in seconds. The example below will update every 4 seconds.

[email protected]:~/Desktop$ glances -t 4

Apparently, with the -s parameter, you may run glances as a client-server application and connect to it remotely to monitor a remote machine, but I could not get that working myself. Connecting to a machine using a secure SSH connection and then running it would make a lot of sense.

After pressing d to hide the disk I/O section.

After pressing d to hide the disk IO section.

After pressing d to hide the disk IO section.

There are many interactive commands that may be used while the utility is running. All are listed in the documentation.

Full documentation here: http://glances.readthedocs.io/en/latest/.

This is one very useful script to monitor your Linux server’s performance. Get a copy today and enjoy a better way to see system information.

How to find out interesting and useful things when at the Linux command prompt.

Find out what day Easter is? Use this useful command.

ubuntu ~ $ ncal -e
March 27 2016

Display the date of Easter for Greek and Russian Orthodox Churches.

ubuntu ~ $ ncal -o
May  1 2016

Find out how much disk space is left on your / partition.

ubuntu ~ $ df -Hla /
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       32G   26G  5.1G  84% /

Get the weather for Montreal Canada with the finger command.

ubuntu ~ $ finger montreal@graph.no
                   -= Meteogram for canada/quebec/montreal =-
 'C                                                                   Rain (mm)
 25               =-----
 24
 23            =--      ---
 22^^^                                    ---
 21                                    ^^^
 20     |   ===                                     5 mm
 19   ==|                  =--               ---    4 mm
 18     |===                  ---   =--             3 mm
 17     |  |                                        2 mm
 16     |  |  |                  ---                1 mm
    23 02 05_08_11_14_17 20 23 02 05_08_11_14_17 20 Hour
 
    SW SE SE SW SW SW SW SW SW SW SW SW  W NW NW NW Wind dir.
     3  2  2  4  7  7  7  6  4  4  4  5  6  6  6  5 Wind(mps)
 
Legend left axis:   - Sunny   ^ Scattered   = Clouded   =V= Thunder   # Fog
Legend right axis:  | Rain    ! Sleet       * Snow
[Your ad here? (Forget it!)]

Get a shorter forecast like this.

ubuntu ~ $ finger o:montreal@graph.no
montreal at 23:00: 22 C, 3.4 mps wind from SSW.

The user may also substitute other cities to get information about where they live.

ubuntu ~ $ finger sydney@graph.no
              -= Meteogram for australia/new_south_wales/sydney =-
 'C                                                                   Rain (mm)
 18                         12                     10 mm
 17---                       |                      9 mm
 16   ^^^                  ==|                      8 mm
 15                     ===  |======  |  |          7 mm
 14      =--                 |        |  |      === 6 mm
 13         ===              |  |   ==|  |     |    5 mm
 12            =========     |  |  |  |==|==|  |    4 mm
 11                    |     |  |  |  |  |  |==|  | 3 mm
 10              |     |     |  |  |  |  |  |  |  | 2 mm
  9           |  |  |  |  |  |  |  |  |  |  |  |  | 1 mm
   _13 16 19 22 01 04_07_10_13 16 19 22 01 04_07_10 Hour
 
     S SW  S SW SW SW SW SE  S  E  E NE SE NW NW  E Wind dir.
     4  4  6  5  3  3  2  3  4  4  4  1  1  1  1  2 Wind(mps)
 
Legend left axis:   - Sunny   ^ Scattered   = Clouded   =V= Thunder   # Fog
Legend right axis:  | Rain    ! Sleet       * Snow
[Rate limited to survive twitter storm. Max 3 connections pr. 30 seconds.]

Get the battery status of your laptop from the command line with a simple utility.

Firstly, install the acpi utility.

ubuntu ~ $ sudo apt-get install acpi

Then just execute the acpi command to get battery information.

Another way to get the system hostname.

jason@jason-virtual-machine ~ $ /sbin/sysctl kernel.hostname | sed -n -e 's/^.*= //p'

The best Linux Mint themes and wallpapers.

Misc themes

Oxygen transparent KDE 4.0 theme.

http://linuxmint-art.org/content/show.php/oxygen-transparent?content=127752.

Uniq KDE 4.0 theme.

http://linuxmint-art.org/content/show.php/uniq?content=112688.

Elegant Gnome pack. GTK 2.0 pack.

http://linuxmint-art.org/content/show.php/Elegant+Gnome+Pack?content=127826.

Vertex theme pack. GTK 3.0 pack.

http://gnome-look.org/content/show.php/Vertex+-+Theme?content=166318.

CinnXP Luna theme. Make your Gnome/MATE desktop look like Windows XP.

http://gnome-look.org/content/show.php/CinnXP-Luna?content=174441.

GTK 3.0 White theme. A GTK theme that looks like the OSX Aqua theme.

http://gnome-look.org/content/show.php/White?content=173840.

Mintyfresh Cinnamon-theme 0.3: http://gnome-look.org/content/show.php/Mintyfresh+Cinnamon-theme?content=156287. A lovely green Cinnamon theme.

Malys Inversio: http://gnome-look.org/content/show.php/malys+-+inversio++?content=152965.

Ambiance Chrunchy: http://gnome-look.org/content/show.php/Ambiance+Crunchy?content=151181. This is the Ambiance theme for your Linux desktop. This is for Openbox as well as Unity and Gnome Shell.

Lucidity 3.0 beta: http://gnome-look.org/content/show.php/Lucidity?content=125877. The lovely Lucidity theme for a Gnome desktop.

Icon themes

Vibrancy colors.

http://gnome-look.org/content/show.php/Vibrancy+Colors?content=167771.

Evolvere Icon theme v1.1.9.1.

http://gnome-look.org/content/show.php/Evolvere+Icon+theme?content=164338.

Faenza v1.3.1.

http://gnome-look.org/content/show.php/Faenza?content=128143.

Metacity themes

Fitts 0.3: http://gnome-look.org/content/show.php/Fitts?content=139285.

Windows 8.1 Modern UI metacity theme: http://gnome-look.org/content/show.php/Windows+8+modern+UI+%28metro%29?content=157024&PHPSESSID=f649f969a8d2a4773c07bb6b379d5a7e.

Win95 1.0: A Windows `95 metacity theme: http://gnome-look.org/content/show.php/Win95?content=159333.

Blended 1.6: http://gnome-look.org/content/show.php/Blended?content=26050.

Nice wallpapers for your Linux desktop

Gorgeous wallpaper, giant stone crags jutting through the clouds: https://alpha.wallhaven.cc/wallpaper/376317.

Giant nebula in deep space: https://alpha.wallhaven.cc/wallpaper/369800.

Soldiers in space suits in a drop ship: https://alpha.wallhaven.cc/wallpaper/367182.

Beautiful rolling hills wallpaper: https://alpha.wallhaven.cc/wallpaper/240615.

Giant thunderclouds over a farmhouse: https://alpha.wallhaven.cc/wallpaper/367052.

Debian swirl wallpaper: https://wallpaperscraft.com/download/linux_debian_brand_logo_spiral_93908/1920×1080.

Glacier wallpaper: https://wallpaperscraft.com/wallpaper/glacier_iceberg_cold_tourists_blocks_excursion_62829.

Linux Mint 14.10 MATE installation and overview of the new release.

A video of the installation and use of the new Ubuntu 14.10 MATE release. This Linux distribution is very promising and looks to be a good alternative to the Linux Mint MATE distribution. See the video here: http://www.youtube.com/watch?v=KjUJPU-Wp1M.

Elysium film showing real UNIX commands in a blockbuster movie.

rhost root shell on an Elysium computer.

rhost root shell on an Elysium computer.

The movie Elysium showcased some awesome UNIX shell commands. The rhost command was one, there is a more detailed show here: http://i.imgur.com/niqfmy5.png. The nmap port scanning utility is used to port scan Matt Damon`s brain before the data is copied from his neural storage to the Elysium computer system. I cannot see the full command; but is a real usage of this useful port scanning utility and shows that Hollywood are actually using real computer commands in their movies. But why are such advanced computers still running a master and slave IDE hard drive system instead of SATA III or something even better? That was a strange scene in the movie, but I guess that they have very advanced IDE drives on Elysium and the transfer rate has been increased over the old technology. But why would you be using such an outdated tech in the year 2154?

nmap scan performed on an Elysium computer.

nmap scan performed on an Elysium computer.

Part of the visible nmap command is the -sV parameter, this is used to probe open ports to determine service. He is probing open ports to see what is running on that port. That is a very useful part of penetration testing. You want to be able to probe the system and see if there are any open ports. Then scan those open ports to see what is running. Then you must find out what version the software is. This allows the attacker to do some research and look for zero day vulnerabilities that could affect the software. Below is an example scan using nmap. This is scanning an old Ubuntu machine for open ports.

[email protected]:~$ sudo nmap -o -P0 -sS 192.168.78.130

Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-06 22:48 EST
Nmap scan report for 192.168.78.130
Host is up (0.00032s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
443/tcp  open  https
444/tcp  open  snpp
9876/tcp open  sd
MAC Address: 00:0C:29:5E:53:4E (VMware)

Nmap done: 1 IP address (1 host up) scanned in 34.42 seconds

Here is a simpler way to scan for open ports.

[email protected]:~$ sudo nmap -sS 192.168.78.130

Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-06 23:02 EST
Nmap scan report for 192.168.78.130
Host is up (0.00033s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
443/tcp  open  https
444/tcp  open  snpp
9876/tcp open  sd
MAC Address: 00:0C:29:5E:53:4E (VMware)

Nmap done: 1 IP address (1 host up) scanned in 24.64 seconds

Below is an example of how to scan for the operating system that the target machine is running. The scan confirms that the machine is running GNU/Linux and a 64bit kernel.

[email protected]:~$ sudo nmap -O 192.168.78.130

Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-06 23:05 EST
Nmap scan report for 192.168.78.130
Host is up (0.00039s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
443/tcp  open  https
444/tcp  open  snpp
9876/tcp open  sd
MAC Address: 00:0C:29:5E:53:4E (VMware)
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=6.40%E=4%D=9/6%OT=22%CT=1%CU=44282%PV=Y%DS=1%DC=D%G=Y%M=000C29%TM
OS:=540B0702%P=x86_64-pc-linux-gnu)SEQ(SP=106%GCD=1%ISR=10A%TI=Z%CI=I%II=I%
OS:TS=8)SEQ(SP=106%GCD=1%ISR=10B%TI=Z%CI=RD%TS=8)OPS(O1=M5B4ST11NW9%O2=M5B4
OS:ST11NW9%O3=M5B4NNT11NW9%O4=M5B4ST11NW9%O5=M5B4ST11NW9%O6=M5B4ST11)WIN(W1
OS:=3890%W2=3890%W3=3890%W4=3890%W5=3890%W6=3890)ECN(R=Y%DF=Y%T=40%W=3908%O
OS:=M5B4NNSNW9%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N
OS:)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=
OS:S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF
OS:=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=
OS:G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)

Network Distance: 1 hop

OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 107.60 seconds

Below I am using the sudo nmap -A -T4 -P0 192.168.78.130 command to perform a more in-depth scan of my system.

Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-06 23:11 EST
Nmap scan report for 192.168.78.130
Host is up (0.00028s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 5.9p1 Debian 5ubuntu1.4 (Ubuntu Linux; protocol 2.0)
443/tcp  open  https?
444/tcp  open  snpp?
9876/tcp open  sd?
MAC Address: 00:0C:29:5E:53:4E (VMware)
OS fingerprint not ideal because: Didn't receive UDP response. Please try again with -sSU
No OS matches for host
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE
HOP RTT     ADDRESS
1   0.28 ms 192.168.78.130

OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 227.20 seconds

This scan shows the open ports as well as some information about the operating system it is running.

How to print out a list of all BBC news headlines with the command line. This is very cool.

This simple one-liner will print out all of the news headlines from the BBC news website in a simple text format. This is useful if you want to do something with a list like this. Or if you just want a listing to see if there is anything interesting happening.

[email protected]:~$ curl -s http://feeds.bbci.co.uk/news/rss.xml | grep "<title>" | sed "s/      <title>//g;s/<\/title>//;" | grep -v "BBC News"

Here is this one-liner in action.

[email protected]:~$ curl -s http://feeds.bbci.co.uk/news/rss.xml | grep "<title>" | sed "s/      <title>//g;s/<\/title>//;" | grep -v "BBC News"
National Living Wage comes into force  
Javid to visit Port Talbot steelworkers  
Tesla launches 'affordable' Model 3  
More obese than underweight, says study  
Police to hire extra firearms officers  
US and China to co-operate over N Korea  
Musician sues ROH over ruined hearing  
Stars turn out for Bowie tribute  
Brussels airport 'to partially reopen'

This is a very good way to get a listing of news items in your terminal. Very useful indeed.

How to connect to a Windows machine using RDP from a Linux machine using bash.

The rdesktop utility for Linux allows easy remote desktop access from a Linux machine. Type: sudo apt-get install rdesktop to install this useful utility and then type: rdesktop 192.168.100.5 to connect to a remote machine.

Windows 7 RDP using rdesktop for Linux.

Windows 7 RDP using rdesktop for Linux.

Specify the username with the -u parameter: rdesktop -u homer 192.168.100.5.

If you wish to use RDP in full-screen; enabling a high-resolution display, then use the -fP parameter: rdesktop -u homer -fP 192.168.100.5

This is a very easy way to connect to a Windows machine using terminal services instead of having to be seated in front of it.

Configuring private Internet access with OpenVPN on Linux Mint.

Private Internet Access with OpenVPN.

Linux Mint 17 RC now available. Download it with these direct links.

Linux Mint 17 is now available. Download this new Linux release from this handy mirror site.

http://ftp.heanet.ie/mirrors/linuxmint.com/testing/.

64 bit ISO 1.3 Gigabytes: http://ftp.heanet.ie/mirrors/linuxmint.com/testing/linuxmint-17-mate-dvd-64bit-rc.iso.

32 bit ISO 1.3 Gigabytes: http://ftp.heanet.ie/mirrors/linuxmint.com/testing/linuxmint-17-mate-dvd-32bit-rc.iso.

This new Linux distribution has all the same features that Linux Mint 16 had, but with all new software. I am trying out the RC build and so far the installation in VMware Workstation 10 has worked a treat. I just need to install vmware-tools and the installed operating system will better integrate with the host hardware.

Linux Mint 17 comes with all new wallpapers and the 3.13 Linux kernel. This offers improvements in hardware support. I think I will be enjoying this release greatly. I managed to install VMware tools from the tarball easily and it works perfectly. I can connect a USB drive from the host to the VM to save files on. This is a very good system. Better than Virtualbox. The RC build comes with Firefox 28. And Libreoffice version: 4.2.3.3.

uname -a output.

[email protected] ~/Documents $ uname -a
Linux homer-virtual-machine 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Download this now; it really is very good indeed.

Some useful Linux commands and tricks for the bash shell user.

The boxes utility for Linux allows you to render an ascii text box around text. Below is an example.

homer@homer-eME730 19:14:21 ~ $ echo `echo "This is a sentence printed to the terminal."` | boxes
/***********************************************/
/* This is a sentence printed to the terminal. */
/***********************************************/

This is a useful utility if you want a text box around your message.

Here I am using sed to replace a word in the sentence printed to the terminal.

homer@homer-eME730 19:30:28 ~ $ echo `echo "This is a sentence printed to the terminal."` | sed 's/sentence/paragraph/gi;'
This is a paragraph printed to the terminal.

Print where you are in the dir tree with this command.

homer@homer-eME730 19:30:52 ~ $ echo $DIRSTACK
~

Or use pwd.

homer@homer-eME730 19:37:17 ~ $ pwd
/home/homer

How to print the directory tree to the preceding directory with the Linux command line.

homer@homer-eME730 19:39:41 ~/Documents $ echo ${OLDPWD}
/home/homer

And this is the environment variable that will print the value of pwd.

homer@homer-eME730 19:41:02 ~/Documents $ echo ${PWD}
/home/homer/Documents

More awesome Linux shell tricks: http://www.securitronlinux.com/bejiitaswrath/more-awesome-shell-tricks-for-the-linux-command-line-this-is-using-the-bash-shell/.

Even more awesome Linux shell tricks: http://www.securitronlinux.com/bejiitaswrath/cispa-bill-still-a-threat-and-awesome-linux-shell-tricks/.

How to use VNC to connect to a remote Linux machine and administer it with the graphical desktop.

Using tightvnc to connect to a remote Linux machine is a good way to access a graphical desktop on a remote Linux box.

Firstly; install the tightvnc server on the target machine to be accessed.

[email protected] ~ $ sudo apt-get install tightvncserver 
[sudo] password for homer: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libwings2 libwraster3 libwutil2 linux-tools-3.11.0-18 linux-tools-3.11.0-18-generic
Use 'apt-get autoremove' to remove them.
Suggested packages:
  tightvnc-java
The following NEW packages will be installed:
  tightvncserver
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 835 kB of archives.
After this operation, 1,819 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ saucy/universe tightvncserver amd64 1.3.9-6.4 [835 kB]
Fetched 835 kB in 13s (63.9 kB/s)                                                                                       
Selecting previously unselected package tightvncserver.
(Reading database ... 253043 files and directories currently installed.)
Unpacking tightvncserver (from .../tightvncserver_1.3.9-6.4_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Setting up tightvncserver (1.3.9-6.4) ...
update-alternatives: using /usr/bin/tightvncserver to provide /usr/bin/vncserver (vncserver) in auto mode
update-alternatives: using /usr/bin/Xtightvnc to provide /usr/bin/Xvnc (Xvnc) in auto mode
update-alternatives: using /usr/bin/tightvncpasswd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode

Then start the server manually and set an access password.

[email protected] ~ $ /usr/bin/tightvncserver 

You will require a password to access your desktops.

Password: 
Verify:   
Would you like to enter a view-only password (y/n)? n

New 'X' desktop is deusexmachina:[email protected] ~ $ sudo apt-get install tightvncserver 
[sudo] password for homer: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libwings2 libwraster3 libwutil2 linux-tools-3.11.0-18 linux-tools-3.11.0-18-generic
Use 'apt-get autoremove' to remove them.
Suggested packages:
  tightvnc-java
The following NEW packages will be installed:
  tightvncserver
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 835 kB of archives.
After this operation, 1,819 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ saucy/universe tightvncserver amd64 1.3.9-6.4 [835 kB]
Fetched 835 kB in 13s (63.9 kB/s)                                                                                       
Selecting previously unselected package tightvncserver.
(Reading database ... 253043 files and directories currently installed.)
Unpacking tightvncserver (from .../tightvncserver_1.3.9-6.4_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Setting up tightvncserver (1.3.9-6.4) ...
update-alternatives: using /usr/bin/tightvncserver to provide /usr/bin/vncserver (vncserver) in auto mode
update-alternatives: using /usr/bin/Xtightvnc to provide /usr/bin/Xvnc (Xvnc) in auto mode
update-alternatives: using /usr/bin/tightvncpasswd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode

Creating default startup script /home/homer/.vnc/xstartup
Starting applications specified in /home/homer/.vnc/xstartup
Log file is /home/homer/.vnc/deusexmachina:1.log

Then connect to the remote machine and type your password to open a graphical window.

[ [email protected] ]
[ Jobs 0.PWD: ~.-bash 4.3.11. ] [ 8 ]
[ 21:55:10 ]
[ $ ]-> xtightvncviewer 192.168.1.3:1
Connected to RFB server, using protocol version 3.8
Enabling TightVNC protocol extensions
Performing standard VNC authentication
Password: 
Authentication successful
Desktop name "homer's X desktop (deusexmachina:1)"
VNC server default format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*" to type FontStruct
Using default colormap which is TrueColor.  Pixel format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0

This is the result. Our remote machine accessed over a LAN. This is a very cool way to access a remote Linux machine and use your Linux desktop.

TightVNC accessing a remote machine on a LAN.

TightVNC accessing a remote machine on a LAN.

The advantage of this is that you can use either Windows Macintosh, or Linux software to access a Linux desktop remotely.

The remmina RDP client may also be used to access a remote VNC session. This works very well indeed.

Remmina accessing a VNC session.

Remmina accessing a VNC session.

So; try this out for yourself. Here is more information on further configuration of the tightvnc setup: http://www.penguintutor.com/linux/tightvnc.

To set a custom desktop environment for the VNC session; edit the ~/.vnc/xstartup file and remove the /etc/X11/Xsession line and replace it with the exec ck-launch-session startfluxbox line if you wish to load Fluxbox.

[email protected] ~ $ cat ~/.vnc/xstartup 
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
#export XKL_XMODMAP_DISABLE=1
exec ck-launch-session startfluxbox # Load fluxbox.

Then kill and reload the tightvncserver binary. This will load a more bandwidth friendly desktop environment for your VNC session.

Gorgeous disused farmhouse wallpaper for your Linux Mint MATE desktop.

Old farmhouse at sunset.

Old farmhouse at sunset.

Yet another way to get the IP address of a host and print it. And other useful networking commands.

This is a good way to get the IP address of a host and print it to the terminal.

[email protected] ~ $ host yahoo.com | awk '/ has address / { print $4 }' | cut -d " " -f14-
98.138.253.109

This is a very useful one liner for getting an IP address.

Very useful awk tips: http://stackoverflow.com/questions/21177338/ipcalc-output-and-grep-want-to-return-only-the-binary-output.

The finger command shows information about users that are logged into a machine.

[email protected] ~/Documents $ finger -lmps
Login: homer                            Name: John Cartwright
Directory: /home/homer                  Shell: /bin/bash
On since Tue Apr 15 09:29 (EST) on tty8 from :0
    2 hours 2 minutes idle
On since Tue Apr 15 09:49 (EST) on pts/0 from :0.0
   1 hour 1 minute idle
On since Tue Apr 15 11:30 (EST) on pts/1 from d110-33-8-105.bla800.nsw.optusnet.com.au
   6 seconds idle
No mail.

The who am i command shows information about your user. I am logged into my machine over SSH so it shows the hostname of my current ISP.

[email protected] ~/Documents $ who am i
homer    pts/1        2014-04-15 11:30 (d110-33-8-105.bla800.nsw.optusnet.com.au)

Display the routing table with the ip route command.

[email protected] ~/Documents $ ip route
default via 192.168.1.1 dev eth0  proto static
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.2  metric 1
192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1

Another way to show the routing table. Use the arp -a command.

[email protected] ~/Documents $ arp -a
? (192.168.1.1) at 84:c9:b2:bd:c2:e7 [ether] on eth0

Yet another way to show the routing table on Linux.

[email protected] ~/Documents $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
192.168.122.0   *               255.255.255.0   U     0      0        0 virbr0

Windows XP support has ended. This is time to update to a better operating system.

Windows XP support has ended.

Windows XP support has ended.

Support for Windows XP has ended, this means that there will be no further updates for Windows XP on the desktop. This is a good time to upgrade either to Windows 7, which is supported until 2020; or to use Linux Mint and enjoy a faster and more reliable desktop operating system. I am using Linux Mint 16, I have Windows 7 Ultimate running in a KVM Hypervisor Window with Firefox nightly, this is a good way to use Windows and Linux at the same time. This way, if the Windows installation clogs up I still have the ability to re-build the VM in short order and be up and running with Windows apps. But Linux has quite a few useful applications that make it a good desktop choice. I am downloading the ATI video drivers within the VM, I am intending to test if the accelerated video drivers will work in a KVM Hypervisor. That will be very interesting. Windows XP has had three service packs applied and it still is not as secure as Linux. But if you run as an unprivileged user and not with an Administrator account, it will be more secure than the default. Although you really should install something more recent if you want worthwhile security. You could even use Windows Server 2012 R2 build 9600 as a desktop operating system and that would be very secure indeed. That build has the new Modern UI shortcut button. Windows 7 is very secure, I like to run as a normal user and UAC takes care of authenticating me when I need the Administrator password.

But Microsoft might get over their tablet and phone obsession and create an operating system for the PC again, with a Windows 7 styled interface. That would be very good for PC users. Tablets are cool, but you cannot program and build a game on one. Developing a map for Goat Simulator is easy on PC when you are using Unrealed 3.0, but not practical on a tablet. That is why we still have PCs to game on and run Hypervisors. I managed to get Spice working with my KVM Hypervisor, I can run Windows 7 at 1600*900 in a window and the performance is very good indeed. After installing 2.4 gigabytes of updates onto my Windows 7 VM it is now working very well. I just installed Firefox Nightly to browse with. The new Chrome layout is quite strange, but it is still usable. I doubt that the new Firefox will work on Windows XP. That operating system is fast and usable, but not very trustworthy these days. Better to upgrade to Mint and enjoy a faster and more reliable desktop with better hardware support. Read more about your options for upgrading here: http://windows.microsoft.com/en-au/windows/end-support-help?ocid=GA8-1_O_WOL_DIS_NULL_XPEOS_Null_02. There are many options out there.

How to encrypt a file with gpg on Linux and then decrypt it later.

The gpg utility for Linux is used to create public and private key pairs to encrypt files for secure transmission over the Internet.

To initialize this utility; run this command.

[email protected] ~ $ gpg --gen-key
gpg (GnuPG) 1.4.14; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: directory `/home/homer/.gnupg' created
gpg: new configuration file `/home/homer/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/homer/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/homer/.gnupg/secring.gpg' created
gpg: keyring `/home/homer/.gnupg/pubring.gpg' created
Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096
Requested keysize is 4096 bits
Please specify how long the key should be valid.
         0 = key does not expire
        = key expires in n days
      w = key expires in n weeks
      m = key expires in n months
      y = key expires in n years
Key is valid for? (0) 4y
Key expires at Mon 02 Apr 2018 19:14:45 EST
Is this correct? (y/N) y

You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and E-mail Address in this form:
    "Heinrich Heine (Der Dichter) "

Real name: John Cartwright
E-mail address: [email protected]@gmail.com
Not a valid e-mail address
E-mail address: [email protected]
Comment: 
You selected this USER-ID:
    "John Cartwright <[email protected]>"

Change (N)ame, (C)omment, (E)-mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, use the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy!  (Need 235 more bytes)
...+++++
..............+++++
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, use the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
.......+++++
..........+++++
gpg: /home/homer/.gnupg/trustdb.gpg: trustdb created
gpg: key DBEF7849 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: next trustdb check due at 2018-04-02
pub   4096R/DBEF7849 2014-04-03 [expires: 2018-04-02]
      Key fingerprint = 6668 2347 5ADF 7577 F09C  B7BF 8B1F 1877 DBEF 7849
uid                  John Cartwright <[email protected]>
sub   4096R/7ED8DC5A 2014-04-03 [expires: 2018-04-02]

Then you may encrypt a file using your keys.

[email protected] ~/Documents $ gpg --encrypt-file doom02.png 
You did not specify a user ID. (you may use "-r")

Current recipients:

Enter the user ID.  End with an empty line: John Cartwright

Current recipients:
4096R/7ED8DC5A 2014-04-03 "John Cartwright <[email protected]>"

Now we have two files, the original and an encrypted file. This is using 4096 bit RSA encryption, so this would be extremely hard to break.

[email protected] ~/Documents $ ls -hula doom02*
-rw-r--r-- 1 homer homer 3.0M Apr  3 20:37 doom02.png
-rw-r--r-- 1 homer homer 3.0M Apr  3 20:37 doom02.png.gpg

Now use this command to decrypt the file.

[email protected] ~/Documents $ gpg --decrypt-file doom02.png.gpg 

You need a passphrase to unlock the secret key for
user: "John Cartwright <[email protected]>"
4096-bit RSA key, ID 7ED8DC5A, created 2014-04-03 (main key ID DBEF7849)

gpg: encrypted with 4096-bit RSA key, ID 7ED8DC5A, created 2014-04-03
      "John Cartwright <[email protected]>"
File `doom02.png' exists. Overwrite? (y/N) y

That is how simple this is. You need a lot of computer activity to generate some entropy, I just played Community Chest 4 MAP32 “Mutare”, that did the job.