Tuesday, December 16, 2008

/usr/share/calendar

The following table gives the name of each calendar file and describes its contents.


calendar.debian Interesting dates around Debian collected at Infodrom

calendar.ubuntu Interesting dates in Ubuntu history

calendar.birthday Births and deaths of famous people.

calendar.christian Christian holidays.

calendar.computer Significant dates in the history of computing.

calendar.history Dates of U.S. historical events.

calendar.holiday Standard and obscure holidays.

calendar.judaic Jewish holidays.

calendar.music Dates related to music, mostly 1960s rock and roll.

NB: tested on ubuntu 8.04.1

Wednesday, December 10, 2008

arping

Finding Duplicate IP Addresses

You want to know how to test an IP address on your LAN to see whether it is a duplicate.
Solution

Use arping, like this:
$ arping -D 192.168.1.76
ARPING 192.168.1.76 from 0.0.0.0 eth0
Unicast reply from 192.168.1.76 [00:14:2A:54:67:D6] for 192.168.1.76 [00:14:2A:54:67:
D6] 0.605ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

Received 1 response(s) means that this address is already in use, and arping even gives you the MAC address. You may also test with a hostname:

$ arping -D uberpc
ARPING 192.168.1.76 from 0.0.0.0 eth0
Unicast reply from 192.168.1.76 [00:14:2A:54:67:D6] for 192.168.1.76 [00:14:2A:54:67:
D6] 0.590ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

You should set a time limit or count limit, or arping will keep running when it gets no response. This example sets a time limit of 10 seconds:

$ arping -w10 -D 192.168.1.100
ARPING 192.168.1.100 from 0.0.0.0 eth0
Sent 11 probes (11 broadcast(s))
Received 0 response(s)

Use -c5 instead of -w10 to tell arping to run for five counts.

if you have intermittent connectivity problems with a particular host , run arping to see if it has a duplicate address

arping will work when ping fails.



source:- carla schroder

Tuesday, December 9, 2008

lanmap utility

Lanmap Listens to all available traffic on the interface of your choice, figures out who’s talking to who, how much, using which protocols.

This information is then put into a nice human-readable 2d image (various formats are available) which can be used to understand a network’s topology.

Install lanmap in Ubuntu

sudo apt-get install lanmap

This will complete the installation

Using lanmap

lanmap syntax

lanmap [-o directory] [-e program] [-T {png,gif,svg}] [-f filtetr] [-D {#,all,raw}] [-r seconds]

[-i {?,*wildcard*,iface}] [-h] [-v] [-V]

lanmap example

lanmap -i eth0 -r 30 -T png -o /tmp/

This will create a lanmap.png file under tmp folder


download lanmap from here http://www.parseerror.com/lanmap/

source : ubuntugeek

Linux IP Command Lines

Display Current Config for all NIC's: ifconfig

syntax:- ifconfig dev ip netmask broadcast

Display Current Config for eth0: ifconfig eth0

Assign IP: ifconfig eth0 192.168.1.2

Assign IP/Subnet: ifconfig eth0 192.168.1.2 netmask 255.255.255.0

Assign Default Gateway: route add default gw 192.168.1.1

Assign multiple IP's: ifconfig eth0:0 192.168.1.2

Assign second IP: ifconfig eth0:1 192.168.1.3

Disable network card: ifconfig eth0 down

Enable network card: ifconfig eth0 up



View current routing table: route "or" route -n

View arp cache: arp "or" arp -n

Ping: ping -c 3 192.168.1.1

Trace Route: traceroute www.whatismyip.com

Trace Path: tracepath www.whatismyip.com

DNS Test: host www.whatismyip.com

Advanced DNS Test: dig www.whatismyip.com

Reverse Lookup: host 66.11.119.69

Advanced Reverse Lookup: dig -x 66.11.119.69

NB:- Warning untested



Setting Up NICs under Fedora and RHEL

Fedora and other Red Hat–type systems use a simple setup that makes it easy to configure network cards at boot time. It is done through the creation of files in the /etc/sysconfig/network-scripts directory that are read at boot time. All of the graphical tools
under Fedora create and manage these files for you; for other people who like to get under the hood, the following sections show how to manually manage the configuration files.

For each network interface, there is an ifcfg file in /etc/sysconfig/network-scripts.
This filename is suffixed by the name of the device; thus, ifcfg-eth0 is for the eth0 device,ifcfg-eth1 is for the eth1 device, and so on.

If you choose to use a static IP address at installation time, the format for the interface configuration file for eth0 will be as follows:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR= 192.168.1.100
GATEWAY=192.168.1.1
TYPE=Ethernet
HWADDR=00:0c:29:ac:5b:cd

TIP In Fedora, Red Hat Enterprise Linux (RHEL), and Centos distros, the file /usr/share/doc/initscripts-*/sysconfig.txt explains the options and variables that can be used in the “/etc/sysconfig/network-scripts/ifcfg-*”, among other things.

From linux news

Monday, December 8, 2008

mac fonts in ubuntu

Want these mac fonts?
AppleGaramond
Aquabase
LITHOGRL
Lucida Grande
Lucida Mac
lucon
MacGrand
If you do follow me, I'll show you how easy it is to install them!

Open up a terminal:
Applications->Accessories->Terminal
Copy/paste these commands:
wget http://ubuntu-debs.googlecode.com/files/macfonts.tar.gz
tar zxvf macfonts.tar.gz
sudo mv macfonts /usr/share/fonts/
sudo fc-cache -f -v

Now the Mac Fonts are installed, if you like these fonts and want them to be the default gnome font, right click on your desktop and select Change Desktop Backround then click on Fonts, and you can customize your system fonts there.

collin henderson

This is terrific .... I love my linux (new ubuntu user - one year) but hate the fonts. Have tired the MS TT''s but this result is exceptional, and I will stick with mac fonts. Also found this to help to know which ones are for where:

You can choose the fonts from:

System -> Preferences -> appearances -> Font

From Font Preferences, I choose these following fonts:

* Application font: Lucida Grande 9

* Document font: Lucida Grande 9

* Desktop font: MACGrande 9

* Window title font: LucidaMacBold

* Fixed width font: Lucida Console


john nillson

To get the fonts to render really nice you have to change two settings wrt to font rendering
1. Enable subpixel rednering
2. Disable all hinting

The first option make sure the highest possible resolution is used when deciding how the pixels should be colored.

The second option disable alignment on pixel edges. In theory hinting should make the font easier to read on a monitor, but in practice I find it easier to read if the font alignment just ignore the pixels. They get somewhat blurrier, but at the same time the blurriness makes them softer and thus easier on the eye.

kahrytan

Better yet, Extract to ~/.fonts folder. no need to place them in /usr/share/fonts


source ubuntu unleashed
NB tested in ubuntu 8.04.1

Friday, December 5, 2008

/proc/sys/vm/drop_caches

what exactly is the purpose of /proc/sys/vm/drop_caches file ?

can any one give a practical situation where the tip given in the following how to is used ?

In the past, I've been forced to do ridiculous things like cat a file larger than available RAM to /dev/null and edit gigabyte files which flood my cache with this data. Luckily, Linux kernels 2.6.16 and newer provide a mechanism to clear the inode, page, and dentry caches on demand avoiding all this headache. All you have to do is echo a value to the proc filesystem, and you're done.

To use /proc/sys/vm/drop_caches, just echo a number to it.

To free pagecache:
echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation and dirty objects are not freeable, the user should run "sync" first!

This was originally found @ http://www.linuxinsight.com/proc_sys_vm_drop_caches.html


ilikejam

The only time I've ever seen anyone use this is when doing I/O benchmarking - dropping the caches forces disk operations to happen on the disk instead of in RAM.

Wednesday, December 3, 2008

linux installation in a logical partition ?

sulekha

1. why is it said that linux should always be installed in primary partitions ?

2. what is the trade off between installing linux on a primary partition and installing linux on a logical partition, is there any performance issues ?

3.is there really a concept of logical partition , since there are only 4 primary partitions and one of them is treated as extended partition which can contain any no: of logical partitions ?


syg00

1) Who said that ? (it's rubbish BTW)
2) Nope.


brianL

Debian testing is running just fine in a logical partition for me.No tradeoff. It's Windows and the BSDs that have to be on a primary partition.

billymayday

3 isn't true anyway - sata can have total of 16 partitions (or is it 15?), ide was 64 from memory


sulekha

Oh you mean the nof logical partitions. in SATA which value is correct 2^4 or 2^4 - 1 , BTW how did IDE or PATA drives get the value 64 ?