Archive for May, 2008

FAQ: How to select fastest APT server in Debian

debian swirl logoQuestion: I want to select APT repository server/mirror that is fastest for my location. How can I do it in Debian?

Answer: You can use application named as “netselect-apt” to get new sources.list file with fastest APT mirror. Install this application by command "sudo aptitude install netselect-apt" and run it in accordance with Debian distribution you use (Debian Etch in our example):

sudo netselect-apt -n etch -o /etc/apt/sources.list
sudo apt-get update

P.S. By the way, in Ubuntu you can do the same in a few clicks.

Download Fedora 9 today and get kernel 2.6.25 and ext4 for FREE! ;)

fedora 9 logoAs it was planned Fedora 9 (codename “Sulphur“) is released today. As for me it wasn’t such expected as Ubuntu Hardy Heron but it is still very important event in Open Source world. So, here is the list of new features in this version of RedHat sponsored Linux distribution:

  • This release features GNOME 2.22. GNOME now includes a webcam photo and video creation utility called Cheese, improved network filesystem support, a new international clock applet, Google Calendar support and custom email labels in Evolution, a new Remote Desktop Viewer, improved accessibility features, and PolicyKit integration.
  • KDE 4.0.3 is available in the KDE Live image as well as the regular DVD.
  • Xfce 4.4.2 is available as part of this release.
  • NetworkManager 0.7 provides improved mobile broadband support, including GSM and CDMA devices, and now supports multiple devices and ad-hoc networking for sharing connections. It is now enabled by default on installations from DVD, CD, the network, and Live images.
  • The Fedora installer, Anaconda, now supports partition resizing for ext2/3, NTFS filesystems, creating and installing to encrypted file systems, improved Rescue Mode with FirstAidKit, independent locations for the second stage installer and the software packages. A redesigned, larger netboot.iso image now features a second stage installer partly for this reason.
  • Live USB images now support persistence, so your data and setting changes will be preserved even after rebooting.
  • PackageKit, a new set of graphical and console tools, with a framework for cross-distribution software management, has replaced Pirut in this release of Fedora. The PackageKit graphical updater is available instead of Pup. Behind PackageKit, the performance of yum has been significantly improved.
  • FreeIPA makes managing auditing, identity and policy processes easier by providing web-based and command line provisioning, and administration tools to ease system administration. FreeIPA combines the power of the Fedora Directory Server with FreeRADIUS, MIT Kerberos, NTP and DNS to provide an easy, out of the box solution.
  • Ext4, the next version of the mature and stable ext3 filesystem is available as a option in this release. Ext4 features better performance, higher storage capacity and several other new features.
  • This release of Fedora uses Upstart, an event-based replacement for the /sbin/init daemon.
  • Firefox 3 brings a number of major improvements including a native look and feel, desktop integration, the new Places replacement for bookmarks, and a re-worked address bar.
  • The completely free and open source Java environment OpenJDK 6 is installed by default. IcedTea 7, derived from OpenJDK 1.7, is no longer the default. IcedTea includes a browser plug-in based on GCJ, and is available for both x86 and x86_64 architectures. GCJ is still the default on PPC architecture.
  • OpenOffice.org 2.4, with many new features, is available as part of Fedora 9.
  • Fedora now includes Perl 5.10.0, which features a smaller memory footprint and other improvements.
  • Fedora now includes TeXLive to replace the older, unmaintained TeX distribution.
  • Fedora 9 features a 2.6.25 based kernel.
  • Kernel crashes can be more automatically reported to http://www.kerneloops.org/ and diagnosed in a friendly way via the kerneloops package installed by default. Crash signatures are commonly referred to as oopses in Linux.
  • Work on the start-up and shutdown in X has yielded noticeable improvements.

***** Download Fedora 9 here

***** Complete Release Notes are here

***** Here is the link to Fedora Wiki

fedora 9 launch

FAQ: How to unload NIC driver (clear ifconfig counters)?

Question: I want to reset counters in /proc/net/dev (also shown in ifconfig output as RX and TX bytes) and thus I have to unload network interface driver. How to do it?

Answer: There are two commands in Linux CLI coming by default which would help to unload drivers: rmmod and modprobe. First of all it is necessary to find what kernel module controls certain NIC and then unload that module. For example, you have VIA VT6102 (RHINE-II) network card that is recognized by Linux as eth0 and want to disable its driver temporarily. Just execute the following:

sudo rmmod via-rhine” or “sudo modprobe -r eth0” (or “sudo modprobe -r via-rhine“). You can use command dmesg to determine the name of kernel module you wish to unload.

FAQ: Iptables rules on timely basis

netfilter logo 2Question: How can I restrict/allow access to certain service on timely basis with iptables? For example restrict access to SSH between 7:00 pm – 8:00 am on weekdays?

Answer: You are welcome to use iptables patch-o-matic extension (pom or p-o-m) that allows you to match a packet based on its arrival or departure (for locally generated packets) timestamp. The syntax is the following:

iptables RULE -m time --timestart TIME --timestop TIME --days DAYS -j ACTION

Where:

--timestart TIME: Time start value (format is 00:00-23:59)
--timestop TIME: Time stop value (the same format)
--days DAYS: a list of days to apply, from (format: Mon, Tue, Wed, Thu, Fri, Sat, Sun).

To add the rule stated in the question use the following command:

iptables -A INPUT -p tcp -d 192.168.0.1 --dport 22 -m time --timestart 19:00 --timestop 8:00 -days Mon,Tue,Wed,Thu,Fri -j DROP

Hope it helps!

FAQ: How to retreive hardware manufacturer name, serial numbers, etc. in Linux command line

ibm serial numberQuestion: How can I get information about hardware manufacturer, model name, serial number, BIOS information using Linux command line (CLI)?

Answer: You are welcome to use dmidecode which helps to get information about your system’s hardware as described in your system BIOS. That information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details depending on the manufacturer.

Beware that DMI data have proven to be too unreliable to be blindly trusted. Dmidecode does not scan your hardware, it only reports what the BIOS told it to. Dmidecode was first written by Alan Cox and is now being further developed and maintained by Jean Delvare. It is released under the General Public License (GPL).

This tool can be easily downloaded from here (source code) or can be installed as binary package included into repositories of many distributions like Debian, Ubuntu, Gentoo. FreeBSD version is also available. Actualy it is reported that dmidecode works well on the following systems:

  • Linux i386
  • Linux x86_64
  • Linux ia64
  • FreeBSD i386
  • FreeBSD x86_64
  • NetBSD i386
  • OpenBSD i386
  • BeOS i386
  • Cygwin i386
  • Solaris x86 (CVS version)

In Ubuntu (my favourite distro) just execute the following: sudo aptitude install dmidecode (sample output is here).




Pages: 1 2 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
Linux HOWTOs, Tutorials & Projects with Adam Palmer | 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 ››