Archive for the ‘Linux-Mint’ Category:

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.

homer@hal9000:~$ 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.

homer@hal9000:~$ 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.

homer@hal9000:~$ 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.


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

Here is a solution that works for the Slashdot website.


curl http://slashdot.org/slashdot.xml | grep "<title>" | sed "s/<title>//g;s/<\/title>//;"

Here is this one-liner in action.


homer@ubuntu:~$ curl http://slashdot.org/slashdot.xml | grep "<title>" | sed "s/<title>//g;s/<\/title>//;"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6480 100 6480 0 0 8674 0 --:--:-- --:--:-- --:--:-- 8674
UCSD To Test Safety of Spinal Stem Cell Injection
Entire South Korean Space Programme Shuts Down As Sole Astronaut Quits
Fugitive Child Sex Abuser Caught By Face-Recognition Technology
California May Waive Environmental Rules For Tesla
Why the Public Library Beats Amazon
The Benefits of Inequality
Where are the Flying Cars? (Video; Part One of Two)
Writer: Internet Comments Belong On Personal Blogs, Not News Sites
Why Hasn't This Asteroid Disintegrated?
T-Mobile To Throttle Customers Who Use Unlimited LTE Data For Torrents/P2P
DEFCON's Latest Challenge: Hacking Altruism
Ask Slashdot: Corporate Open Source Policy?
Snowden: NSA Working On Autonomous Cyberwarfare Bot
NASA's Greenhouse Gas Observatory Captures 'First Light'
Android Motorcycle Helmet/HUD Gains Funding

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.

homer@homer-virtual-machine ~/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.

homer@deusexmachina ~ $ 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.

homer@deusexmachina ~ $ /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:1homer@deusexmachina ~ $ 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.

[ homer@3.13.0-24-generic ]
[ 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.

homer@deusexmachina ~ $ 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.

homer@deusexmachina ~ $ 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.

homer@deusexmachina ~/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.

homer@deusexmachina ~/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.

homer@deusexmachina ~/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.

homer@deusexmachina ~/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.

homer@deusexmachina ~/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.

homer@deusexmachina ~ $ 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: john@cartwright302@gmail.com
Not a valid e-mail address
E-mail address: johncartwright302@gmail.com
Comment: 
You selected this USER-ID:
    "John Cartwright <johncartwright302@gmail.com>"

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 <johncartwright302@gmail.com>
sub   4096R/7ED8DC5A 2014-04-03 [expires: 2018-04-02]

Then you may encrypt a file using your keys.

homer@deusexmachina ~/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 <johncartwright302@gmail.com>"

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.

homer@deusexmachina ~/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.

homer@deusexmachina ~/Documents $ gpg --decrypt-file doom02.png.gpg 

You need a passphrase to unlock the secret key for
user: "John Cartwright <johncartwright302@gmail.com>"
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 <johncartwright302@gmail.com>"
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.

Using the tar command on Linux to uncompress tar.gz files with the command line.

The tar command on Linux is very useful for uncompressing files on your Linux machine. The most used command on a Linux system is uncompressing files that you have downloaded from an Internet source.

The tar -xvf command will uncompress a tar.gz file.

~$ tar -xvf myfile.tar.gz

To uncompress a tar.bz2 file use this command.

~$ tar -jxvf myfile.tar.bz2

Here is an example.

mint@mint ~/Downloads $ tar -jxvf libdvdcss-1.2.13.tar.bz2 
libdvdcss-1.2.13/
libdvdcss-1.2.13/src/
libdvdcss-1.2.13/src/dvdcss/
libdvdcss-1.2.13/src/dvdcss/dvdcss.h
libdvdcss-1.2.13/src/libdvdcss.pc.in
libdvdcss-1.2.13/src/device.c
libdvdcss-1.2.13/src/error.c
libdvdcss-1.2.13/src/ioctl.h
libdvdcss-1.2.13/src/device.h
libdvdcss-1.2.13/src/css.h
libdvdcss-1.2.13/src/common.h
libdvdcss-1.2.13/src/csstables.h
libdvdcss-1.2.13/src/ioctl.c
libdvdcss-1.2.13/src/libdvdcss.c
libdvdcss-1.2.13/src/libdvdcss.h
libdvdcss-1.2.13/src/css.c
libdvdcss-1.2.13/README
libdvdcss-1.2.13/aclocal.m4
libdvdcss-1.2.13/configure
libdvdcss-1.2.13/config.h.in
libdvdcss-1.2.13/depcomp
libdvdcss-1.2.13/test/
libdvdcss-1.2.13/test/dvd_region.c
libdvdcss-1.2.13/test/csstest.c
libdvdcss-1.2.13/config.sub
libdvdcss-1.2.13/config.guess
libdvdcss-1.2.13/AUTHORS
libdvdcss-1.2.13/libdvdcss.spec
libdvdcss-1.2.13/NEWS
libdvdcss-1.2.13/Makefile.am
libdvdcss-1.2.13/doc/
libdvdcss-1.2.13/doc/doxygen.cfg.in
libdvdcss-1.2.13/doc/footer.html
libdvdcss-1.2.13/doc/header.html
libdvdcss-1.2.13/COPYING
libdvdcss-1.2.13/INSTALL
libdvdcss-1.2.13/configure.ac
libdvdcss-1.2.13/ChangeLog
libdvdcss-1.2.13/missing
libdvdcss-1.2.13/m4/
libdvdcss-1.2.13/m4/ltsugar.m4
libdvdcss-1.2.13/m4/lt~obsolete.m4
libdvdcss-1.2.13/m4/libtool.m4
libdvdcss-1.2.13/m4/attributes.m4
libdvdcss-1.2.13/m4/ltversion.m4
libdvdcss-1.2.13/m4/ltoptions.m4
libdvdcss-1.2.13/install-sh
libdvdcss-1.2.13/ltmain.sh
libdvdcss-1.2.13/Makefile.in
libdvdcss-1.2.13/msvc/
libdvdcss-1.2.13/msvc/libdvdcss.dsp
libdvdcss-1.2.13/msvc/workspace.dsw
libdvdcss-1.2.13/msvc/csstest.dsp
libdvdcss-1.2.13/msvc/config.h

To create a tar.gz archive of a directory and its contents, use this command: tar -zcvf archive.tar.gz dir/

mint@mint ~/Downloads $ tar -zcvf mine.tar.gz mine/
mine/
mine/mylist.txt
mine/my.txt

To uncompress to a specific directory, use the uncompress command with the -C parameter. Here I am uncompressing the archive to /tmp.

mint@mint ~/Downloads $ tar -xvf mine.tar.gz -C /tmp/
mine/
mine/mylist.txt
mine/my.txt

To list the contents of a tar.gz file; use this command.

mint@mint ~/Downloads $ tar -tvf mine.tar.gz
drwxr-xr-x mint/mint         0 2014-02-18 01:24 mine/
-rw-r--r-- mint/mint      8552 2014-02-18 01:24 mine/mylist.txt
-rw-r--r-- mint/mint         0 2014-02-18 01:24 mine/my.txt

For a tar.bz2 file; you would use this command.

mint@mint ~/Downloads $ tar -jtvf mine.tar.bz2
drwxr-xr-x mint/mint         0 2014-02-18 01:24 mine/
-rw-r--r-- mint/mint      8552 2014-02-18 01:24 mine/mylist.txt
-rw-r--r-- mint/mint         0 2014-02-18 01:24 mine/my.txt

An alternative to CPU-Z for your Ubuntu or Linux Mint desktop. This utility is awesome.

A very good CPU-Z alternative for a Linux machine.

Screenshot I-Nex CPU info.

Screenshot I-Nex CPU info.

This awesome utility for Linux is an alternative to the CPU-Z program for Windows machines. This allows the user to gather information about their computer with a nice tabbed interface. There is a tab to gather system/OS information as well as CPU statistics. This is very useful for testing out a new computer with Linux installed to see what hardware you have installed.

The tabs are:

  • CPU;
  • GPU;
  • Motherboard;
  • Audio;
  • Drives;
  • System;
  • Kernel;
  • Memory;
  • Network;
  • USB Input;

So, this is quite a comprehensive system information application. This allows the computer user to gather a lot of information about your Linux computer.

We need to add Gambas3 PPA to install I-Nex in Ubuntu and Linux Mint. Use the commands listed below to add both PPAs and install I-Nex in Ubuntu and Linux Mint.

homer@deusexmachina ~ $ sudo add-apt-repository ppa:i-nex-development-team/stable
homer@deusexmachina ~ $ sudo add-apt-repository ppa:nemh/gambas3
homer@deusexmachina ~ $ sudo apt-get update
homer@deusexmachina ~ $ sudo apt-get install i-nex

Then type i-nex in a terminal or look for it under the System Tools menu.

Screenshot I-Nex System information.

Screenshot I-Nex System information.

If you cannot get i-nex installed on your system, try cpu-g instead. This displays the same information and actually works very well on Ubuntu 15.04.

Download this here: http://sourceforge.net/projects/cpug/?source=typ_redirect. Extract the tarball:

tar -xvf cpu-g-0.9.0.tar.gz

Then enter the directory created.

jason@eyjafjallajkull:~/Downloads$ cd cpu-g-0.9.0/
jason@eyjafjallajkull:~/Downloads/cpu-g-0.9.0$

And you may then run the pre-compiled executable.

jason@eyjafjallajkull:~/Downloads/cpu-g-0.9.0$ ./cpu-g 
cpu set to #0
The cpu-g utility. Showing CPU information.

The cpu-g utility. Showing CPU information.

How to find out which rpm package provides a file that you need.

How to find out what rpm package provides a file that you need.

The yum provides command is useful for finding out this information. You may use wildcards to search for a file, this can make finding it easier.

[homer@localhost jackhammer]$ yum provides */redhat**.jpg
Loaded plugins: langpacks
nagios-3.5.1-4.fc20.x86_64 : Nagios monitors hosts and services and yells if somethings breaks
Repo        : fedora
Matched from:
Filename    : /usr/share/nagios/html/images/logos/redhat.jpg



stardict-3.0.4-7.fc20.x86_64 : A powerful dictionary platform written in GTK+2
Repo        : fedora
Matched from:
Filename    : /usr/share/stardict/dic/stardict-dict/res/redhat_logo.jpg

Here is another example.

[homer@localhost ~]$ yum provides */ld-linux.so.2
Loaded plugins: langpacks
glibc-2.18-11.fc20.i686 : The GNU libc libraries
Repo        : fedora
Matched from:
Filename    : /lib/ld-linux.so.2



glibc-2.18-12.fc20.i686 : The GNU libc libraries
Repo        : updates
Matched from:
Filename    : /lib/ld-linux.so.2

This is another way to search the rpm database for certain packages.

[homer@localhost ~]$ yum search redhat
Loaded plugins: langpacks
======================================================= N/S matched: redhat =======================================================
publican-redhat.noarch : Common documentation files for RedHat
perl-CPANPLUS-Dist-Fedora.noarch : CPANPLUS backend to build Fedora/RedHat RPMs
pybugz.noarch : Command line interface for Bugzilla written in Python
python-rhsm.x86_64 : A Python library to communicate with a Red Hat Unified Entitlement Platform
redhat-lsb.i686 : Implementation of Linux Standard Base specification
redhat-lsb.x86_64 : Implementation of Linux Standard Base specification
redhat-lsb-core.i686 : LSB Core module support
redhat-lsb-core.x86_64 : LSB Core module support
redhat-lsb-cxx.i686 : LSB CXX module support
redhat-lsb-cxx.x86_64 : LSB CXX module support
redhat-lsb-desktop.i686 : LSB Desktop module support
redhat-lsb-desktop.x86_64 : LSB Desktop module support
redhat-lsb-languages.i686 : LSB Languages module support
redhat-lsb-languages.x86_64 : LSB Languages module support
redhat-lsb-printing.i686 : LSB Printing module support
redhat-lsb-printing.x86_64 : LSB Printing module support
redhat-lsb-submod-multimedia.i686 : LSB Multimedia submodule support
redhat-lsb-submod-multimedia.x86_64 : LSB Multimedia submodule support
redhat-lsb-submod-security.i686 : LSB Security submodule support
redhat-lsb-submod-security.x86_64 : LSB Security submodule support
redhat-lsb-supplemental.x86_64 : LSB supplemental dependencies required by LSB certification tests
redhat-lsb-trialuse.i686 : LSB Trialuse module support
redhat-lsb-trialuse.x86_64 : LSB Trialuse module support
redhat-menus.noarch : Configuration and data files for the desktop menus
redhat-rpm-config.noarch : Red Hat specific rpm configuration files
rhn-client-tools.noarch : Support programs and libraries for Red Hat Satellite or Spacewalk
rhnsd.x86_64 : Spacewalk query daemon
yum-rhn-plugin.noarch : Spacewalk support for yum

  Name and summary matches only, use "search all" for everything.

There is also the yum search all command that allows full searching of all rpm packages.

[homer@localhost ~]$ yum search all ssh-client
Loaded plugins: langpacks
==================================================== Matched: ssh-client ====================================================
gsi-openssh.x86_64 : An implementation of the SSH protocol with GSI authentication
gsi-openssh-clients.x86_64 : SSH client applications with GSI authentication
openssh.x86_64 : An open source implementation of SSH protocol versions 1 and 2
openssh-clients.x86_64 : An open source SSH client applications

These commands make finding files on your Fedora Linux machine even easier than before.