Linux Tips and Tricks
The info here is mostly from Mails from various Linux groups / mailing
lists. Other stuff I have learnt myself and am publishing here for
others to use :)
Apache on Linux
- Viruses (Windows: nmida) may be trying to access machine:
symptons: "mystery" attempts in the access_log. This is obviously
someone unknown to me, as they are attempting to access WinDoze
directories. Yup - Windoze attacks. Wont hurt you other than fill
# For Code Red,
Just put this your http.conf and you wont see that MS crap anymore :-)
SetEnvIf Request_URI "^/default.ida" attacks
SetEnvIf Request_URI "^/scripts" attacks
SetEnvIf Request_URI "^/c/winnt" attacks
SetEnvIf Request_URI "^/_mem_bin" attacks
SetEnvIf Request_URI "^/_vti_bin" attacks
SetEnvIf Request_URI "^/MSADC" attacks
SetEnvIf Request_URI "^/msadc" attacks
SetEnvIf Request_URI "^/d/winnt" attacks
CustomLog /usr/adm/apache/access.log common env=!attacks
- Never chain a CDRom behind a hard disk: It will slow down the
hard disk's speed.
- Beowulf only works with programs specifically written (or
modified...) for it.
- All access to devices and drivers is through special files in the
directory /dev. They're special, because they're not real files, per se,
but more like "gateways" (for lack of a better word) to the driver(s) in
- Qt is a C++ toolkit for application development. It lets
application developers target all major operating systems with a single
application source code. Qt provides a platform-independent API to all
central platform functionality: GUI, database access, networking, file
handling, etc. The Qt library encapsulates the different APIs of
different operating systems, providing the application programmer with a
single, common API for all operating systems. The native C APIs are
encapsulated in a set of well-designed, fully object-oriented C++
classes. Qt-based applications have the native look and feel of whatever
platform they run on. There is no performance hit incurred by using Qt.
Qt is not based on operating system emulation or run-time
interpretation. Qt-based applications are native, compiled C++
applications on each platform. The Qt library simply replaces Motif,
MFC, etc. Qt-based applications run at least as fast as applications
written with those toolkits. The memory footprint is also the same. The
Qt/Desktop product family consists of the Qt/Windows, Qt/X11, Qt/Mac. A
non-commercial version of Qt/X11 is the de facto standard C++ toolkit
for GUI applications on Linux. The KDE desktop environment is based on
- Try typing info:gcc or man:gcc into Konqueror. You'll never look
back. While you're there, shove an audio CD in and try audiocd:/
- "info --subnodes --output - | less" provides output similar to
ISO / CD / DVD
- Use "dd if=/dev/cdrom of=output.iso" or "cat /dev/scd0 >
/burning/img.iso" to create an ISO image for a CD
- cdda2wav: audio ripper
- To Copy an audio CD:
# cdrdao read-cd --driver generic-mmc --device 0,0,0
# cdrdao write --driver generic-mmc --speed 24 --device 0,0,0
Network / Net Services / Proxy / Firewalls
- A great proxy server is squid
or use junkbuster, a
proxy server that filters out webads.
- If DCHP client does not work after compiling kernel, check for
"Socket Filtering" option selection.
- NFS / file sharing with KDE:
I guess I have to add that I don't need to mount anything into my
filesystem. If you want users to access files on other machines kde
3.1's konqueror goes where no
other ap has ever gone before. Thanks to KDE's integration you can open
kwrite (text editor) (or quanta, web stuff editor) and type in stfp://user@host/directory - you then
open the remote directory in the open file dialogue. You can bookmark
the directory right there. You can edit the remote file and save it
where it resides.. Apart from sftp it also supports ftp, samba, nfs,
http, and hosts of other protocols. It's extremely powerful.
- whois provides information
about an IP address.
- whois -a ip_addr: provides info about IP addr
- whois -h whois.apnic.net ip_addr: provides ifo about ip from
- ntsysv enables you to add and stop daemons at startup.
- Hostname is stored in /etc/sysconfig/network
- use urpmi.remove to get rid of the CD sources for package
"Installation CD 1 (x86) (cdrom1)"
urpmi.removemedia "Installation CD 2 (x86) (cdrom2)"
urpmi.removemedia "International CD (x86) (cdrom3)"
and replace them with an FTP source:
and add the contrib source:
so it never ever prompts you for CDs (assuming you've got broadband)
Add the plf software source:
ftp://plf.chem.yorku.ca/pub/plf/9.0 with hdlist.cz