Click Technology

Linux, Windows, Mac it's all good

How do I change my MAC Address?

August13

In Ubuntu, just open a terminal window and install macchanger if needed..

sudo apt-get install macchanger

OK, now use macchanger..

sudo macchanger eth1 -r

This will change the wifi address, as your physical CAT 5 port is prolly eth0. The command above will change the MAC address to a random MAC address.

If you need to find out what the name of your ethernet ports are, including wireless, look no further…

sudo ifconfig

Sweet!

posted under Linux Tips | No Comments »

How do I renew my DHCP Address?

August13

In Ubuntu, just open a terminal window and type

sudo dhclient -r

That should drop (release) the address. To renew it…

sudo dhclient
Simples!
posted under Linux Tips | No Comments »

Display a .conf file without the comments

August8

Sometimes, when you get long .conf files wit long commentaries, it’s handy just to see the actual meat in the file. Here’S how, suing grep with a simple regular expression.

grep ^[^#] /etc/thefile.conf

You can also use…

cat /etc/thefile.conf | egrep -v "^\s*(#|$)") 
posted under Linux Tips | No Comments »

What CPU do I have?

June15

In Ubuntu, just open a terminal window and type

cat /proc/cpuinfo

Compare it here.

Simples!

posted under Linux Tips | No Comments »

MySQL Table Data Copy

June4

To copy data and a table structure in the same database, say to backup a table, here’s the code…

First, connect onto MySQL – this assumes of course that your mySQL serve allows connections etc., root logon to the db and so on. Typically to localhost, it does.

mysql -h localhost -u root -p

Pump in the password to the root account.

To see all your databases use…

mysql> show databases;

To use one of those databases, use…

mysql> use the_name_of_the_database;

You should get the ‘database changed’ message.

to see the tables in the database, use…

mysql> show tables;

Now you can back up a table if you like…

mysql> CREATE TABLE new_tbl SELECT * FROM original_tbl;

Simple as.

posted under Linux Tips | No Comments »

How can I secure my Linux box?

May11

This is a long and detailed topic, and there’s plenty to read on the interweb, but you should definitely consider items such as….

which dynamically update your firewall rules when your machine is attacked amongst other features.

For hardening, try Bastille Linux.  RTFM first, as this could be problematic if you screw up.

posted under Linux Tips | No Comments »
« Older EntriesNewer Entries »

This is my website for short blog posts and interesting materials that are noteworthy or have some handy-tip value.