Monday, August 7, 2017

Uninstall reinstall VMWare player Fedora

This is sometimes required after a Kernel upgrade and the built in VMware player models update doesn't work.
simply uninstalling and reinstalling vmwareplayer makes it usable again.

vmware-installer -u vmware-player  


download latest VMware-player bundle

make executable

./VMware-Player-12.5.7-5813279.x86_64.bundle


vmwareplayer should now work again.

Monday, July 24, 2017

Quickly Zip and encrypt file/folder/sub-folders recursively with password

zip -er filename.zip  

-e = encrypt
-r = recursively

eg

zip -er documents.zip documents_folder

or

zip -er document.zip document.docx

will ask you for password before zipping

to zip without encryption simply


zip -r documents.zip documents_folder




Tuesday, May 9, 2017

Send an email from the terminal when job finishes

some_program.sh; echo "some_program.sh finished running" | mail -s "Job Status Update" username@gmail.com

This can also be used when a program is already running

some_program.sh

[Ctrl]  Z 

[1]+ Stopped some_program

fg ; echo "some_program.sh finished running" | mail -s "Job Status Update" username@gmail.com

Thursday, December 29, 2016

Quantum theory and consciousness

"Consciousness determines existence"
"Nothing exists in the physical world unless a conscious mind observes it"
and "What has been seen cannot be unseen"

The human brain is a perfect quantum computer, and your consciousness is  information stored at the quantum level. Where particle matter is physically entangled with other particles in the universe.(possibly even the multiverse) It is therefore quite plausible that your consciousness can exist after death.
After the death of the body, quantum information carried by consciousness merges with our universe and can exist infinitely in it.  It is plausible that your consciousness can migrate to another universe or to another place in this one Instantly, much faster than the speed of light.
Quantum Mechanics is needed to explain the phenomenon of consciousness.

Scientists claim to have found a possible carrier of consciousness.  These elements are located inside neuronal microtubules.  These microtubules  have been attributed with the simple role of providing support  as well as a transport mechanism to quantum elements  inside living cells. Based on their structure, these  microtubules are perfect to act as the transport medium for quantum particles inside the brain. That is likely due to the fact that they are capable  of maintaining quantum states for a long time, meaning they can perform a role inside a quantum computer. similar to that of fibre optic networks that carry data between computers.

Watch the below two short videos explaining the double slit experiment  before continuing. (you will find them fascinating)

Double slit experiment explained:



second  video explaining  and illustrating the double slit experiment:


Quantum physics suggests that our observation of the universe is related to the awareness that an electron appears to show in the wave/particle duality (double slit experiment).

We see the world and the universe from our point of reference. We are the monitoring equipment in the double slit experiment. When seen through our eyes, the universe follows Einsteins wave like behaviour, however our eyes as an instrument are only capable of receiving reflections of light in its wave like state and everything we observe follows strictly the laws of nature and relativity. Our presence and observation capability is paramount  in how the universe is perceived. However when we are not present, IE  we Die.  our reality ceases to exist and without an observer the universe which is made up of particles is in a quantum superposition state, as there is no point of reference. The light waves do not have an instrument to measure or see them. The monitoring equipment is switched off. Light is made up of  entangled photons and exists as energy in a particle based multiverse in a quantum superposition state. Your consciousness therefore must exist for the universe to continue to exist and therefore your consciousness can be transported anywhere in the universe or multiverse instantaneously. When you have lost your point of reference, IE your Body , eyes, ears etc.
When you die your consciousness is Quantized.

Now watch the following short video before continuing.



Our universe is not only  limited to the three dimensions. In fact, new theories hypothesise that there are multiple dimensions. (there could be an unlimited amount) Many of the natural phenomena happening within our universe transcend our known three dimensions.  Therefore, we should not assume that the mechanisms of operation of the brain and consciousness are imprisoned within the confines of our three dimensional universe.

Watch the following video..


Watch the following documentary:


Quantum Entanglement.

The  idea of quantum entanglement is that two particles can be intimately associated to one another even if they are separated by billions of light-years of space. A change brought about  in one particle  will have an  effect on the other one. And  amazingly these changes can occur instantaneously!   This theory is completely incompatible with the known theory of Albert Einstein , specifically the theory that information cannot travel faster than the speed of light. But it opens up huge theoretical possibilities for interstellar space travel and exploration, teleportation  and even a better understanding of the multi verse.

"If you are not Astonished by Quantum mechanics, then you have not understood it "
Niels Bohr


Pay attention to the teleportation part of the following video at the 18:27 mark


In Einstein's theory of relativity time is relative to your position in space. And the faster you travel towards the speed of light, time slows down for you compared to when you where not in motion, as demonstrated in the

Hafele–Keating experiment
https://en.wikipedia.org/wiki/Hafele%E2%80%93Keating_experiment

However you the observer will  not notice the slow down in time, as space time is always constant and relative to you. Time has continued to be exactly the same from your point of reference. IE in your reality.
But since two different states of time now exists. IE the two different clocks in the Hafele Keating experiment display different times. What has changed?  The point of observation has changed. Understand that these are two different realities. Reality is 100% subjective and only exists to its observer. Reality cannot exist independently on it own.
Space time according to Einsteins theory is a Smooth Continuum. eg light is described as a wave and its speed is constant in all directions, from any observers view. This in itself is incompatible with the theory of relativity because the speed of any moving object  is always relative to the observer.
in Quantum mechanics Space and time is Quantized,  meaning no relativity exists, but everything is made up of particles that are interconnected, and the mere observation of the particles disrupts their quantum state.

Scientists have teleported particles using particle entanglement. The quantum state of particle A is transmitted from position one to position two between two entangled particles. Once the quantum state of particle A is rebuilt in position two, particle A is then destroyed from position one.
So in theory if every single particle in your body can be entangled, copied and rebuilt instantaneously to a position a billion light years away. This will include your memories and your consciousness which remember  are simply information stored at the quantum level.

What then happens if  Particle A in position one is not destroyed.  Then you would be existing in two places at the same time! and would have two different points of reference. two different observation points and two separate realities.
Which is nearly impossible to comprehend since which reality would you be conscience of?  Einstein's theory of relativity simply does not allow for this extraordinary, astonishing possibility. Einsteins theory of relativity needs to have something to be relative to, there must be at least one reality for relativity to work. But  Reality can not exist independently. It always needs a single point of reference, hence  without reality there can be no relativity. The two aren't mutually exclusive.
 "Nothing exists in the universe unless a live, conscious mind observes it" Quantum mechanics does.not have this delema. sub atomic particles (Photons)  exist without being observed. , and the multi world possibility now not only becomes probable, but even obvious.

Every living things reality is different. Eg an Ant's reality is completely different to yours,  A tree to an Ant is not the same tree that it is to you. A more advanced race might see more to a tree than what we see. A tree may give off vibrations that we do not have the instruments  to receive and interpret them with, as we in comparison are limited to the functions of our primitive eyes. But an advanced race could easily have an eye that is better and more advanced than ours, with many more functions,  that can receive and make sense of these vibrations. When we let go of our reality IE when we die, it is at that moment that our consciousness is Quantized, and in its quantum state and only whilst it is not being observed, it is capable of being in multiple places at the same time. It is capable of travelling billions of light years in an instant, It is capable of travelling through obstacles, it is capable of all this and more. Your consciousness on steroids. your consciousness now one with the singular cosmic consciousness. You see, if there was no Cosmic consciousness , our universe would not exist.

"Nothing exists in the physical world unless a conscious mind observes it."


Documentary on Einstein and Bohr's incompatibilities.


















Thursday, October 27, 2016

Solving Network problems on Linux VMs when Cloning VMware Virtual machines

Connect to vCenter Server using the vSphere Client
Right-click the virtual machine and click Edit Settings.
Click Network adapter and note the MAC Address.

For example, you see a MAC Address similar to:

00:50:56:86:00:00

Power on the Linux virtual machine.
Open a console and log in as root.
Change directory to etc/sysconfig/network-scripts.
Edit ifcfg-eth0 and  update the MAC address to reflect the MAC address in Step 1
Edit /etc/udev/rules.d/70-persistent-net.rules  and update the MAC address to reflect the MAC address in Step 1

Activate the ethernet card by running this command:

ifup eth0. 



Friday, October 14, 2016

Reset the permissions of all installed Programs

Reset the permissions of  all installed RPM packages

for p in $(rpm -qa); do rpm --setperms $p; done
for p in $(rpm -qa); do rpm --setugids $p; done

Above command combination will reset all the permissions to the default permissions under CentOS / RHEL / Fedora Linux.


Wednesday, September 28, 2016

Restart Gnome 3 Shell without logging out and without loosing running applications.

press Alt + F2, type "r" then Enter. This will work so long the shell isn't unusable.

if Shell is unusable then try

Ctrl +Alt + F1 to take you into a shell

and then send SIGQUIT to the gnome-shell process which will terminate only the shell:

killall -3 gnome-shell


Monday, August 29, 2016

Replace Firewalld with iptables

 Fedora/CentOS7 / RHEL 7  are completely systemd based, So on these versions of Linux we need to use systemd commands to disable firewalld and enable iptables


  •  Disable Firewalld Service.

# systemctl mask firewalld

  • Stop Firewalld Service.

# systemctl stop firewalld

  • Install iptables service related packages.

# yum -y install iptables-services

  • Make sure service starts at boot:

# systemctl enable iptables

 If you do not want ip6tables, You can skip following command
# systemctl enable ip6tables

  • start the iptables services.

# systemctl start iptables

 If you do not want ip6tables, You can skip following command.
# systemctl start ip6tables

Firewalld Service is now disabled, You can use iptables.

Monday, August 8, 2016

How to Roll back a yum update or a yum install

Easy backout of yum patching


yum install screen
Dependencies Resolved
=================================================================================
 Package          Arch       Version            Repository              Size      
=================================================================================
Installing:
 screen           i686       4.0.3-16.el6       rhel-6-server-rpms      484 k    

Installed:
  screen.i686 0:4.0.3-16.el6
Complete!


Next, identify the transaction ID that we want to 'undo'
type

 yum history
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     8 | root              | 2011-10-03 14:40 | Install        |    1   
     7 | root              | 2011-09-21 04:24 | Install        |    1 ##
     6 | root              | 2011-09-21 04:23 | Install        |    1 ##
     5 | root              | 2011-09-16 13:35 | Install        |    1   
     4 | root              | 2011-09-16 13:33 | Erase          |    1   
     3 | root              | 2011-09-14 14:36 | Install        |    1   
     2 | root              | 2011-09-12 15:48 | I, U           |   80   
     1 | System           | 2011-09-12 14:57 | Install        | 1025  
The transaction ID we are interested in is '8', so move forward with undo step. If want to see additional information to verify this is transaction interested in, use yum history info 8 prior to doing the undo

 yum history undo 8
Loaded plugins: product-id, refresh-packagekit, subscription-manager
Updating Red Hat repositories.
Undoing transaction 8, from Mon Oct  3 14:40:01 2011
    Install screen-4.0.3-16.el6.i686
Resolving Dependencies
--> Running transaction check
---> Package screen.i686 0:4.0.3-16.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved
================================================================================
 Package          Arch       Version            Repository              Size
================================================================================
Removing:
 screen           i686       4.0.3-16.el6       @rhel-6-server-rpms     783 k

Removed:
  screen.i686 0:4.0.3-16.el6
Complete!


Thursday, May 19, 2016

yum install from CD rom


insert CD rOM

mount -t iso9660 /dev/cdrom /mnt/cdrom

vim /etc/yum.repos/cdrom.repo

add the following lines


[dvd-source]
name=RHEL dvd repo
baseurl=file:///mnt/cdrom/Server/
enabled=1
gpgcheck=0


yum repolist
yum repolist all 

to see new active repo


Monday, May 9, 2016

Windows service wont start access denied

start ,search and type:- cmd, right click on returned cmd.exe and select "run as administrator" at the prompt type:-

net localgroup Administrators /add networkservice
press enter then type:
net localgroup Administrators /add localservice
press enter then type:
exit
press enter and restart your computer

Open services and make sure the service is started.

Saturday, February 13, 2016

Vim: Change search syntax highlighter colour


When you search in Vim the results are highlighted
if the highlighting colour is wrong you cannot read the text.
There are two sets of default colour maps: One for a light and another one for a dark background.

If you have a black background, use the following command to get a better colour map for syntax highlighting:

:set background=dark

Likewise if you have a light background you would want to use the following command to get  a better colour scheme for the highlighter.

:set background=light

These commands can either be run inside of vim by going into command mode and entering them.
or you can add them to your .vimrc file

Friday, January 22, 2016

dig Examples


Below are a couple of examples on how you can use dig. These are common examples and include queries such as mail exchange lookup, address record lookup, reverse dns lookup, etc.
you can always add the  '+short' option at the end of any dig command to keep the output manageable:

eg dig www.example.com +short

Perform a Basic DNS Dig
This is simply going to tell us what the IP address is for the domain www.example.com. The output will be an IP address which will be something like 1.2.3.4.

dig www.example.com

Reverse DNS Dig
Perform a reverse DNS dig lookup. This will translate an IP address into its domain name. The output will be a domain name such as www.example.com.

dig -x 1.2.3.4

Dig MX Record Lookup
An MX (Mail Exchange) record tells us that the record is a domain name that is responsible for accepting email. The below command will tell us what domain name the mail record below is pointing as well as the priority of the mail records. . The output will be the domain name the record points to such as mail.example.com, which tells us that the mx record example.com resolves to mail.example.com.

dig -t MX example.com

Show the TXT or SPF records

dig example.com txt

Directly Query A DNS Server
By default the dns query will resolve off of your own dns server (which is usually the dns server of your ISP or local server), however we can manually specify the dns server we want to query by adding @ns1.example.com to the dns dig command.


dig @ns1.example.com www.somedomain.com

Directly Query the TXT records of a  specific name server
dig @ns1.example.com www.somedomain.com txt

Show the Name servers of a domain
Here's how to query for a list of nameservers for a given domain,

dig example.com ns

dig traceroute information
If you like the traceroute command, you can do something similar with dig to follow DNS nameservers, like this, using the

dig example.com  +trace

 or to keep the output manageable:

dig example.com  +trace +short







Saturday, December 12, 2015

Block IP using blackole route

A null, also known as Blackhole, is a routing table entry that discards a matching packet without sending it further. It is mainly used for preventing/ blocking an unwanted IP to attack your system. It drops the IP using IPtables. for instance, if you want to block an IP address 192.168.0.1, you can write the command:
# ip route add blackhole 192.168.0.1/32

your system will now drop all packets coming from 192.168.0.1

Teaming 2 Network cards

If we have two network interfaces, eth0 and eth1 and we want it to be shown in a single bond as bond0, we need to first create a config file with the name bond0. The network configuration in Linux stores files in etc/sysconfig/network-scripts/ directory.
The work parameters must be set as follows:

#vi /etc/sysconfig/network-scripts/bond0

DEVICE=bond0
IPADDR=192.168.1.20
NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
The IP address must be replaced with your actual setup.
Open eth0 and eth1 configuration files
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
Modify the parameters as follows:
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
Save and close the file.
 Now load the bond driver/module when the channel bonding interface is brought up. The kernel configuration files are also modified using # vi /etc/modprobe.conf
Add these lines :
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
 Test configuration using these two steps:
Firstly, load the bonding module:
# modprobe bonding
Restart the network to see bond0 interface:
# service network restart

Both Nic's should now be working as one

Wednesday, September 30, 2015

Add a windows domain user to a computers local administrator group remotely




To Add a windows domain user to a computers local administrator group remotely

first download and install PsExec from

https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

open command prompt

use psexec to connect to computer

psexec \\computer_name -u \domain\administrator -p password cmd

a command prompt of the remote computer will open on your computer

then type in the command prompt

net localgroup administrators domain\user /add

should return command completed succesfully

Done.


Monday, August 3, 2015

Ethtool Examples


Ethtool is the defacto tool for interacting with your network adapters.

ethtool ethn0   (or whichever eth device you want information on)
gives you detailed information about your network adapter.

ethtool -i eth0  Will display the driver settings, driver version,firmware version and bus details

ethtool -a eth0  will show you the auto negotiation details of your adapter.

ethtool -S eth0 will display network statistics IE how many bytes have been sent and how many bytes have been received by the adapter.

And then my favourite

ethtool -p eth0   will physically identify your network card by causing the LED's on the network card to flash on and off.  this is very useful when you have multiple network interfaces and need to know which interface is bound to which eth device on your system.

ethtool -t eth0 offline     will bring the adapter offline to perform diagnostics and testing
ethtool -t eth0 online     will perform testing whilst the adapter is online and available to your system)

provided your Nic supports this feature ethertool will perform diagnostics  on your network adapter



Thursday, July 30, 2015

Output from rpm -qa, how to extract only the name of the package?

If you need to migrate to a new computer and want to install the same packages that were on your old computer on the new one, the following pipes all the packages into a list that you can then use to install on the new computer.

rpm -qa --qf "%{NAME}\n" > filelist.txt

Then to install the packages

yum -y install  `cat filelist.txt`
or
yum -y install $(cat filelist.txt)