commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
Shows which applications are making connections, and the addresses they're connecting to. Refreshes every 2 seconds (watch's default). Test on OSX, should work anywhere watch and lsof work.
Simple way to test if a port is available to the public. Run this command on the "server" and run a `telnet host-ip port-number` on the client. Test by sending strings to the server, which will be displayed in the server terminal.
This forces a bonded interface to switch to another slave in the bond as its active slave.
Super fast way to ftp/telnet/netcat/ssh/ping your loopback address for testing. The default route 0.0.0.0 is simply reduced to 0.
Disabling an interface's multicast filter is like disabling IGMP snooping on a switch. It is useful for testing and troubleshooting.
Real gurus don't need fancy tools like iftop or jnettop.
TCP Connect scanning for localhost and network 192.168.0.0/24
This option is much faster, as it checks only network nodes.
This option selects the listing of all Internet and x.25 (HP-UX) network files.
Check open TCP and UDP ports
While `lsof` will work, why not use the tool designed explicitly for this job?
(If not run as root, you will only see the names of PID you own)
shows opened ports on machine in continuous mode (refreshing every 10 sec)
This command only check the network connection from given eth. This is very useful if you are using more then one interface in your server or laptop.
see http://iptraf.seul.org/ for all kinds of documentation and screenshots
Sometimes, you don't really care about all the other information that ifconfig spits at you (however useful it may otherwise be). You just want an IP. This strips out all the crap and gives you exactly what you want.
on multihomed hosts, connected to several networks, could be usefull to know the source address (local ip address) used to reach the target host, this command does not require root priviledges.
The command use a TCP socket, if there is any error the command return an empty string, elsewhere return a valid ip address.
Works only on Linux.
Last option (n) turn name of service resolving (/etc/services) off.
This is an commandline utility to get fair piece of information about the attached network card.
the command for the impatient sysadmin: simply checks every five secs, if a host or a specific service running on it is up. ideal for hosts that are configured not to respond on pings.