Fetch information about a random Linux command.
curl -sL commandlinefu.com/commands/random/plaintext | sed '3,4!d' |
Here is an example.
┌─[jason@neo]─[~] └──╼ $curl -sL commandlinefu.com/commands/random/plaintext | sed '3,4!d' # An easter egg built into python to give you the Zen of Python echo "import this" | python |
The zen of python.
┌─[jason@neo]─[~] └──╼ $echo "import this" | python The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! |
Get your external IP address with this command.
┌─[✗]─[jason@neo]─[~] └──╼ $curl http://ipecho.net/plain |
Print the internal IP addresses on your local machine.
┌─[jason@neo]─[~] └──╼ $/sbin/ifconfig $1 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'; 127.0.0.1 192.168.100.5 |
This also works to get your IP address.
┌─[jason@neo]─[~] └──╼ $/sbin/ifconfig $1 | grep "inet addr" | awk -F: '{print $2}' | perl -n -e 'print unless $. == 1' 192.168.100.5 Bcast |
How to list the contents of a gzipped archive. The lsar command will take care of this easily.
┌─[jason@neo]─[/usr/share/doc/vim-common] └──╼ $lsar changelog.Debian.gz changelog.Debian.gz: Gzip changelog.Debian |
View the remaining battery life on your Linux laptop with the acpi command. This is a good way to see how long you have until you need to plug in your laptop.
┌─[jason@neo]─[/usr/share/doc/vim-common] └──╼ $acpi Battery 0: Discharging, 36%, 01:29:54 remaining |
How to list all installed packages with the apt command.
How to disable desktop icons on the Linux Mint MATE desktop. Very easy with the Configuration Editor.
Print an army tank at your shell prompt.
#!/bin/sh echo "▅ ●▄███████||▅▅▅▅▅▅▅▅▅|█" echo "¶▅ ●██████▄▄▄▄▄▄▄▄" echo "▄███████████████▅▄▃▂ ▲" echo "██████████████████► ▲▲" echo "◥☼▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙☼◤" |
Simple .xsession file to load a minimal Linux desktop. Very useful when using larswm or Fluxbox.
#!/bin/sh # # Copyright (c) 2004 Lars Bernhardsson, see README for licence details # # sample.xsession - Login script for larswm # # Clear root window settings and set background color xsetroot && xsetroot -solid DarkSlateGrey # 2nd screen # xsetroot -display :0.1 && xsetroot -display :0.1 -solid lightgray # Start a couple of tools xload -geometry 96x48-0-0 & xbiff -geometry 48x48-100-0 & oclock -geometry 48x48-152-0 & # Start a background job that feeds date/time to larswm larsclock & # Start wm. exec larswm |