Add the BackTrack repositories to your Debian based GNU/Linux distribution. Thanks to http://it-john.com/home/technology/linux-technology/add-back-track-4-repo-to-ubuntu/
This will remove all installed kernels on your debian based install, except the one you're currently using. From: http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-1590
In Bash, when defining an alias, one usually loses the completion related to the function used in that alias (that completion is usually defined in /etc/bash_completion using the complete builtin). It's easy to reuse the work done for that completion in order to have smart completion for our alias. That's what is done by this command line (that's only an example but it may be very easy to reuse). Note 1 : You can use given command line in a loop "for old in apt-get apt-cache" if you want to define aliases like that for many commands. Note 2 : You can put the output of the command directly in your .bashrc file (after the ". /etc/bash_completion") to always have the alias and its completion Show Sample Output
apt-get is pretty aggressive when it downloads, potentially hogging the bandwidth of your network. The 25 is in KB, change this to your needs.
when we add a new package to a aptitude (the debian package manager) we need to add the gpg, otherwise it will show warning / error for missing key Show Sample Output
Display recursive file list (newest file displayed at the end) and be free to access last file in the list simply by pressing arrow_up_key i.e. open it with joe editor.
BTW IMHO the list of files with newest files at the end is often more informative.
Put this 'lsa' function somewhere in your .bashrc and issue
. ~/.bashrc
or
source ~/.bashrc
to have access to the 'lsa' command immediately.
.
(the function appends command "joe last_file_in_the_list" at the end of command history)
Remove old kernels (*-generic and *-generic-pae) via apt-get on debian/ubuntu based systems. Tested on ubuntu 10.04 - 12.04.
This let's you find out the total packages that have available upgrades. Usefull if you want to check or show the total available upgrades on your system. Show Sample Output
Like 7172, but much easier.
if you don't want to show string "version?, then use awk or cut filter it: apt-cache show pkgname | grep -i "version:" | awk '{ print $2 }' we can also use regex to search many packages and show their versions: apt-cache search pkgregex | grep -i "version:" Show Sample Output
Please install aria2c before you try the above command. On ubuntu the command to install aria2c would be:
sudo aptitude install aria2
Create Debian package dependency graph using GraphViz
The really awesome bash completion in debian seems to be an extra package now, which has to be installed. After sourcing /etc/bash_completion it completes almost everything (package names in apt... etc) :-) To make this permanent, put something like this in your .bashrc: if [ -f /etc/bash_completion]; then source /etc/bash_completion fi
Works for debian and ubuntu based distros. Show Sample Output
This has been my "sysupgrade" alias since ca. 2006, first used on Debian Sid, then Sabayon, and it still does its duty on Mint nowadays without breaking stuff.
Install the unrestricted version of libavcodec . It will keep away from any issues or missing codecs in video editors or transcoders. Install unrestricted version of libavcodec by the command.
Install the Linux kernel headers for currently running kernel version on Debian-based systems via apt-get Show Sample Output
for debian/ubuntu
commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: