Linux

Bandwidth throttling/control on linux

The two most popular solutions:
  • trickle, a userspace bandwidth shaper. It's just this easy:
    trickle -d 200 -u 30 firefox
  • Wonder Shaper, a kernelspace bandwidth shaper. More efficient for interface-level bandwidth shaping (but does not support per application control at all).

Mdadm Cheat Sheet

This just the kind of help that a casual software raid (mdadm) user -like me- needs.

Removing disks from an LVM volume

A nice, detailed howto. It's in the Ubuntu forums, but it does not contain anything Ubuntu specific (ie. you can use it with any distribution).

UNetbootin

"UNetbootin allows you to create bootable Live USB drives for a variety of Linux distributions from Windows or Linux, without requiring you to burn a CD. You can either let it download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list."

UNetbootin supports (at least at the moment) a lot more distributions than LiLi. However LiLi is a lot more user-friendly (meaning that is has a lot fewer options and a lot fewer chances for users to break the process Smiling ).

Linux Live USB Creator (LiLi)

"LiLi is a free and open source software for Windows that allows you to create a portable and bootable USB stick running Linux (various distributions are supported). Also offers an exclusive option of automatic virtualization to launch directly this Linux in Windows without any configuration nor installation (using a portable version of VirtualBox 3.0)."

How to check the installed GCC version and the GCC that was used to compile the kernel

The former was obvious, but the latter I had to look up (and found on the linked website). The kernel's GCC version is in /proc/version.

GLOBIGNORE - a useful bash default for all users

By default (at least in Ubuntu 9.04) if you use the .* wildcard in Bash, it will match the . and .. entries as well. I've seen not just once users executing this in a directory:
rm -r * .*
Their intention was to remove all entries in the current directory. However since the default shell is bash and by default the .* matches .. too, the command will traverse up in the directory tree ... at least as far as it can go with the user's privileges.

Gnome settings, changing global defaults and setting a keyboard shortcut for all users

If you're into reading manuals, then start with "Using GCong" in the "GNOME Desktop System Administration Guide". It has almost all the info that I'm going to describe here. However if you're just interested in how to set up global Gnome defaults (ie. defaults for all users), then read on.

Fail2ban - proctect a server from brute-force attacks

"Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address."
There's a nice Debian howto here for a basic setup of Fail2ban to protect the SSH daemon from brute-force login attempts.

How to specify the sender ("From") of an email with the mail command

The last reply to this post contains the answer. The mail command does not report any -r option if you run it with mail --help (neither does the manpage mention it), but it's there and works. It's a bit hidden and you've to apply it in a special way.

Syndicate content