Archive for June, 2008 Page 2 of 3



Change MAC address of network interface in Linux

Well, thankfully this is rather trivial task for Linux and you can change MAC address of your network adapter using a few CLI/console commands. Honestly speaking it is impossible to literally change MAC address as it’s loaded into firmware but you can configure Linux so it will transform old MAC to the new one the fly.

The commands are are below but before typing them let’s consider why one might need this. One of the simplest examples is here: you acquire IP address, gateway, DNS entries via DHCP server which is set up to give out your IP settings to your MAC address only so if you change [possibly broken] network adapter you will need to ask sysadmin to change DHCP server’s settings… If this looks familiar to you, just type the following commands with sudo prefix or under superuser/root:

ifconfig eth0 down
ifconfig eth0 hw ether 00:19:7e:53:8c:a3
ifconfig eth0 up

eth0 – is hardware name of your network interface, you can use ip link to see all available interfaces identified by your system.
00:19:7e:53:8c:a3 is new MAC address you’d like to apply to the NIC.

These commands should be added into startup scripts if you require them to appear after Linux system reboots. This works on any distribution like Fedora, Ubuntu, Debian, RedHat, Suse whatever.

#ln -s /dev/null /dev/clue

jitcrunchaspx.jpeg

:) found at http://17outs.com/.

Linux aternatives to Windows software roundup

Below are the links to sites you may want to visit in order to find Linux equivalent of certain commercial Windows software:

osalt logo1. Open Source Alternative
Quick and useful guide to the best open source software. You can fing here the open source alternatives to your favorite commercial products (not only Windows ones). The main advantage of this site is that you can browse through their software categories and compare pros and cons of both commercial products as well as open source software.

2. The Linux Alternative Project

The goal is to provide an informational and available website for all linux users. I will be periodically updating the database with Windows software and the Linux equivalents and alternatives.

Nice and simple site to find Windows software alternative project name and see comments on it for your Linux box.

3. Linux Screw’s Windows Software => Linux Software page
That page is based on Linux Alternative Project’s staff but it is updated more often and contains some new applications suggested by our visitors. You are welcome to leave a comment and offer and Linux or Windows application you wish to be added to Linux Screw’s software equivalents list.

linuxquestions logo4. LinuxQuestions.org’s Linux Software equivalents page
This is categorized list of programs that was prepared to prevent duplicating threads like “Where can I get a program for Linux that is similar to XYZ program on Windows?”. Useful and informative list.

5. Windows-Linux Software
Russian table of equivalents / replacements / analogs of Windows software in Linux. Very informative and descriptive. The page is available in many languages including English, Russian, Italian, Spanish, French, German and others.

Of course you are welcome to use Google to find needed software :)

Create .deb or .rpm from .tar.gz with checkinstall

tar logoCheckinstall is extremely useful utility to create .deb packages for Debian, Ubuntu (or .rpm packages for Fedora, RedHat, CentOs) from .tar.gz (or .tgz) source tarball after it’s compiled at your Linux box. In other words you can prepare binary package for later usage without need to compile software from sources every time you need to get it installed on certain Linux box.

Another application of checkinstall is software deinstallation that was compiled and installed from sources. As you might already noticed, not every programmer adds “uninstall” rule to Makefile and thus command “make uninstall” would fail. The nice solution is to use checkinstall to prepare binary package from sources and then install or uninstall it with dpkg command (or rpm in RedHat based distributions).

Here is the short algorithm on how to prepare .deb package from clamav source tarball:

1. Install checkinstall:
sudo aptitude -y install checkinstall (Ubuntu, Debian and related distributions)
or
sudo yum install -y checkinstall
(for rpm based distributions, please note that checkinstall usually isn’t included to standard Fedora/RedHat repositories, so you will need to link up third party repo like DAG)
or
compile checkinstall from sources

2. Get clamav sources:
wget http://mesh.dl.sourceforge.net/sourceforge/clamav/clamav-0.81.tar.gz (as an example)

3. Install libraries that might be necessary for clamav compilation:
sudo aptitude install libgmp3 libgmp3-dev
(this command is applicable for Debian and certainly will be different for Fedora or RedHat)

4. Compile clamav:
tar xvfz clamav-0.81.tar.gz
cd clamav-0.81/
./configure --sysconfdir=/etc
make

5. Run checkinstall and follow its intuitive instructions (enter package description etc.):
sudo checkinstall -D make install

6. When finished you’ll get clamav-0.81_0.81-1_i386.deb (or rpm package if you use Fedora/RedHat/CentOs) you may want to install with sudo dpkg -i clamav-0.81_0.81-1_i386.deb (or sudo rpm -i ...) or move to another PC for later installation.

FAQ: How to set up atomatic Linux reboot if kernel panic occurs?

Question: How can I get my Linux server rebooted/restarted automatically if it caught a kernel panic?

Answer: As you might know, kernel panic is an action taken by an operating system upon detecting an internal fatal error from which it cannot safely recover; the term is largely specific to Unix and Unix-like systems (it’s a wiki’s description).

By default Linux wouldn’t not reboot after panic occurs, but the following option of sysctl will cause a kernel to reboot after N seconds you specify. In our example server will be rebooted in 15 seconds if kernel panic stopped its operation:

1. Open sysctl’s configuration file:
sudo nano /etc/sysctl.conf

2. Add there the following line:
kernel.panic = 15

or

1. Execute the following command:
/sbin/sysctl -w kernel.panic=15

Hope it helps!

Information improvisation: Sign up with 000-151 exam for getting incredible online itil v3 certification courses and 199-01 prep guides. We also provide best 000-979 dumps & HP2-T16 with guaranteed success.




Pages: Prev 1 2 3 Next
Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
TuxArena: The arena of Tux | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››