The Ultimate Bashrc File

Various Gnome Stuff

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

15
Become a Fan
8.0

Available as/for:arch-package
Description:
For those who love using the terminal, here is a '.bashrc' file I created, mainly for those who've had issues with their own. Hopefully it'll benefit those of whom love aliases, functions, and such. Probably more than you need, so modify all you want. I've organized it best I can to make it easier for using and modification. This is also for those many who've had a difficult time finding a good source for their own on the net, like it was for me.

Oh, and any modifications that others wish to share are always welcome.

Instructions:

Just extract the tar file and put in your home directory. You may have to overwrite the current one, so be sure to backup whatever beforehand. FYI, the default text in the '.bashrc' is included in this version so if you haven't modified it at all, you should have nothing to worry about.

To refresh it, just type in the terminal:

source ~/.bashrc

...or just close your terminal window and open it again.
Last changelog:

1.0: Initial Release

1.1-2.0: Fixed some secure-delete substitutions, added several more functions, a few more aliases, and some settings, improved chown substitution aliases to work for all usernames, added a few more aliases, such as for adding repositories and pubkeys, fixed a few username things and cleaned up a few things, added copy/paste function, a couple bashrc aliases, and cleaned up some more things, added a Remasterys copying function once ISO is made, nifty function to run a program on a timer, and a function to undo apt-get build-dep, which is quite hard prior to this function. Also added a few more aliases, fixed a typo here and there, added an awesome 'sudo' function for greater security, some chown aliases, and a couple easy joke accessibles, added timer, google, roman-numeral, lsext, and few other functions, updated program-timer to close only gnome-terminal being used, & cleaned up and organized ALOT to make it even prettier, fixed a typo causing a tab completion error, added ALOT more command prompt options, several network aliases (thanks to Brutus180), many other aliases and functions, a new section for completions with several already & cleaned up lots of things, minor tweakage, as well as the addition of built-in fragmentation-checking and defragmentation tools using functions

2.1-2.5: Added more functions, including encrypt/decrypt, debextract, debremaker, display-off, added an alias for auto-setting background to live image of earth, & condensed a few various things here and there, few small removals of obsolete functions, and minor cleaning and organization of some things, added several more functions, aliases, prompt choices, and bash settings, & made it even easier to read (oh, and thanks goes to chmurli's bashrc as well as several others I found which housed quite a few new ones to me), added several more functions (credit goes to Chrispy as many were found in his awesome bash tool, BashStyle-NG), & tons of cleaning and perfecting, added quite a few more functions and aliases, including ruler, currency_convert, findlocation, spellcheck, flight_status, man2text, morse2text/text2morse, mwiki, natdebt, oneliners, pronounce, tweet, showme (easy view of an alias/function), suntimes, 99bottles, einstein, etchasketch, futurama, guitartune, matrix, wscan, fixed translate, dict, die, and a few others, & further organized and polished the whole thing, added even more functions and aliases, removed some extra spaces here and there, changed default terminal title to current directory, removed some redundancies, cleaned up even more...too much to really mention at the moment, added a few more functions such as convertatemp, dec2text, hilow, showfile, underscore, validator, & webspell, cosmetics, 'Earth' fix & bashDirB added

2.6-3.0: Added more aliases and functions, such as color-picker, linesort, meta-backup, packagelist, randomline, randomwpt, removeduplines, sec2all, themeinfo, & whodat (alternative to whoisonline, thanks to dewar1). Also added Alternative To The "200 Lines Kernel Patch That Does Wonders", with included instructions on making it work (just uncomment the five '.bashrc' lines as per your Linux distro). Fixed 'themeinfo' as there was both alias and function of same name, & also, one or two tiny corrections. Added few more functions and aliases. Also had a few minor changes and updated meta-backup function. Added a number of new functions and aliases, including doscheck, num2text_, anagrams, fest, pick-card, roll-die, phone2text, url-info, coin-flip, searchnreplace, screencastw, topsites, and added a few new bash settings. Fixed couple typos, added Nate Mitchell's (Kasyx's) Bash Prompt & changed 'history' alias so it didn't conflict with actual 'history' command. Added several more functions and aliases, such as where, cp_mp3_to, functions, supportWrap, source_print, deadlib, freqwatch, 4chanimages, googlevideo, randommac, freemusiccharts, flv2ogg, among several. Also added several more functions and aliases, including atomtitles, audioextract_dvd, boxeedl, buf, charcount, cmfu_rating, ffa, findtcp, hiddenpnps, ie, image_resize, irssi, kfire, laptop_display, linecount, lssd, netscan, netstats, ngramviewerdl, oe, qrurl, restoremod, rtfm, setessid, stopflash, txt2md, urlping, vimcmd, and wordcount. Changed a couple things that conflicted with actual terminal commands & added a few more functions/aliases, such as println and find_alternatives. Added a few more bash settings, as well as some more descriptions, fixed a couple of things, and added more functions/aliases, such as alph, cputemp, day, downNuncompress, epochdaysleft, fixmount, mkdirday, month, overwriter, pngoptim, randomip, rcommand, resizeimg, txt2pdf, unjar, vcd2mpeg, WHOAMI, wma2wav, & wordfreq

3.1: Added even more aliases and functions, including: cmdpkg, comp, dos2unix, fix-tabs, ip2locate, log, memlimit, musiccdinfo, pdf2png, rdp, real_location, rmall_but, sort_csn, string2bin, subdir_find, termproxy, terrorist-level, words, wscan, yt2mp3, yt-chanrip, yt-mp3chanrip

3.2: Added a DVD copying, ripping, and backup section in the functions area, which includes some very good (and high quality) preset functions on easily converting your DVDs to AVIs; 3.21: Updated this section to also include several analog and digital tv functions for easy conversion to AVI; 3.22: Tweaked some of the above section's settings; 3.23: A few further improvements to the dvd2avi functions; 3.24: Even more tweaking, including a couple iso2avi functions, and a dvd2iso2avi, which would first copy to the hard drive before converting (an alternative to the dvd2avi which requires constant DVD access); 3.25: Major ripping functions update, now with a universal video2avi for extremely easy use; 3.26: Further video2avi function modifications

3.3: Major update to video2avi, now with tons more presets and custom settings, and better conversion stuff, as well as several more functions, including: align_center, align_right, audiorecord-45dB, awesome, cyanide, mpfb, pascal, svnradd, ur1: 3.31: Further updating of video2avi, including Divx options and tons more custom choices

3.4: Updated/Tweaked numerous things, including several aliases and functions, such as: big, cgrep, command_not_found_handle, ds_, eh, fur, grabtweets, killall_wine, lsmac, map-files, numpages, portcheck, QUERY, quickemail, say, screenr, screensaver, se_, services, shebang, touchpad_id, touchpad_off, touchpad_on, type, viaco, and yt-pl2mp3; 3.41: commented out the function: command_not_found_handle, which was causing system freezes when inputing misspelled words (thanks to Zeroangel for finding the issue)

3.5: Added more stuff, including an optional bash greeting, a way to automatically keep Adobe from tracking everything you do, the ability to save bash history in real time, a logged 'rm', build/script booster (`glu` and `repath`), and an enhanced 'cd' function, among many other functions, such as say_, adobenospy, mem, rf, and compression_level

3.6: Added an optional holiday greeting, a default 'VIDEO_FORMAT' bash setting which is sometimes required for certain mencoder commands, and added several more functions/aliases, including a video2dvd I wrote, oports, sedi, and bluray2xvid

3.7: More functions/aliases: allVideos, command-timer, count_files_by_ext, fileName, svn_find, gotxt2imgmail, hourglass, lsr_, manswitch, prep, timeDNS, wireless_sniffer; also improved 'dd' aliases, including adding 'dd' with progress options (using 'pv'), more 'cleanup' aliases, and an 'extundelete' section for easy recovery for deleted files/folders; 3.71: Tweaked some 'dd' aliases, as well as dvd2iso, and added some more functions/aliases, such as: man_ext, NotifyOnBATTERY, uptime_min, pagerank, connected, connected_, wallpaperWarn, get_duration, sshmysql, date_, and display-offed

3.8: Further cleaning of script, including some bash settings' tweaks/additions, several more aliases/functions, such as imgur, whichpath, crontest, cn_, br, scpsend, ogg2mp3, ogg_info, flac2ogg, flac2mp3, getExtension, & getFileName, and several I made, such as the very handy two: transmissionbl and tv

3.9: Added more functions and aliases, including, about, cleanup, repository-update-check, title, paste, upper, lower, listhw, diffxml, vie, wgetall, cpo, isdef, quietly, cpus, codename, codename_ver, distro, jd, jda, upto, xpath, dups, comparenclean, relinux-copy, & remastersys-copy, as well as added a relinux & remastersys alias section, and updated extundelete aliases

4.0: Updated for Oneiric, but also backported for Natty (just some various additions/removals and such), and added several more aliases/functions, including an updated dups section, a workaround for 'debmaker' alias, an auto-cleanup of temporary files at startup of bashrc, moz/mozz, localIps, google-fonts, bleachbitcleanup, keject, upalevel, kindle_connect, kindle_disconnect, xzv, google_chart, human_filesize, geoipme, nocomments, filext, piratebay, out, mid, top_processes, allips, readfile, wma2mp3, wma2ogg, dateformatcodes, lastfile, expandurl, ontime, mp3_tagging, 7z_it, right, showdiff, biggest_user, total_video_length, and spaceremover, among others

4.1: Updated for Raring, but should work fine in Saucy. Will test soon to be sure.

4.2: Updated for Saucy/Trusty, added several functions and aliases, added the Liquid Prompt option, and added a new section for use with my custom Ultimate Nemo/Nautilus Scripts Pack, which I will upload soon.


Ratings & Comments

101 Comments

jocixlinux

10 10 the best

robertjw

I've been using your .bashrc file for a couple years, but the rm function that is supposed to log rm activity doesn't work for filenames with spaces in them. For example, here is a recent file I attempted to remove with the output. rm docs/Foo\ 2015\ Dealer\ Price.pdf /bin/rm: cannot remove ‘docs/Foo’: No such file or directory /bin/rm: cannot remove ‘2015’: No such file or directory /bin/rm: cannot remove ‘Dealer’: No such file or directory /bin/rm: cannot remove ‘Price.pdf’: No such file or directory /bin/rm: cannot remove ‘echo’: No such file or directory /bin/rm: cannot remove ‘rm docs/Foo 2015 Dealer Price.pdf issued at Tue Aug 4 11:27:56 MDT 2015 by the user bob in the directory ’: No such file or directory I just downloaded the latest version but didn't see any changes to rm. I'm using Ubuntu 15.04

inameiname

Sorry to hear your problem. I found your problem on another thread (https://www.linuxquestions.org/questions/linux-software-2/broken-rm-function-4175470089/), but it provided no clear answer. As such, I had to figure it out myself. Using a couple different techniques, I made this: [code] function rm() { orig_ifs="$IFS" IFS=$'\n' for i in $@ ; do date >> /tmp/rm.out +"%a %d %b %Y %T: rm -v $i" /bin/rm -v $i done } [/code] It works for all filenames, whether they have spaces or not. I didn't create the main justs of the code, but tweaked a couple I found to suite my needs. I will update my bashrc when I get a chance. Thanks for being a long-time supporter of it. Gives reason for all my hard work.

deielmo

Hi ... Anyone can help directing me to any functions/ aliases that I can use to easily view and change the command prompt on this bashrc othr than going in to un"#" and "#" the prompts. btw, im using debian wheezy gnome. ans also a mac osx ... wondering if this will work in mac osx.. Thanks in advance!!!!!!!!!!!!!!!!!!

inameiname

Did you ever figure this out? I'm afraid I don't know a way to manually tweak a Bashrc file without opening it up as a text file and physically editing it (such as adding/removing the '#' comments. But I don't know how a function/alias could do this. I would guess there are probably some GUIs for editing a bashrc file out there which might do something like this. But it would have to be a very good one to be able to tweak a custom bashrc file. Finally, I don't know if this would work on a Mac OSX. Some functions/aliases might if they line up with the same ones under Mac OSX, but I'm not sure if any of the prompt stuff would. I'm no expert on Mac OSX, though.

deielmo

Hi ... Anyone can help directing me to any functions/ aliases that I can use to easily view and change the command prompt on this bashrc othr than going in to un"#" and "#" the prompts. Thanks in advance!!!!!!!!!!!!!!!!!!

iceman32ad

wondering if this is safe to use with saucy and/or if it has a new hosting home(also what type of changes need to be made if safe but needs up dating)

inameiname

Hey there. Apologies for not updating this file in a while. I am hoping to very soon. As for its safety on Saucy, I am not 100% certain yet as I have not tried it on Saucy. That said, I have tweaked it some to work fine in Raring, and just today looked closely at it to see if anything would need to be changed, and I don't see an issue. So using the one I'll update on here, you should be fine on Saucy. The big issue was the Natty one (my last one since) was Gnome2 and this is Gnome3, so a few changes had to be made. But I think it's good now. Anyway, I'll update the file on here with the one I use on Raring. Whenever Linux Mint 16's Stable Release comes out I'll update it again for Saucy.

Timslin

I don't understand what this file does? What would this do or how would it help my terminal?

inameiname

Let me see if I can clarify for you. The 'bashrc' file can be an invaluable tool on a Linux machine, and its terminal. Now, before I get to its biggest ability, let me give you a couple quick things. For one, it can 'make pretty' your terminal window. If you want to change the color of the font, or what is said when you open a window, or what info is there, or etc., this can do that. If you want to run various commands upon startup of a terminal window, you can add them on this. If you want it to store/not store various things, you can tweak those settings here. Now, in regards to the 'bashrc' file's biggest function, basically, a 'bashrc' file is a list of 'keyboard shortcuts' that you can use in the terminal. For instance, instead of having to input an entire line of code to perform a specific command, you can type a single letter, or word, and they trigger preset commands (called aliases and functions (little more fancier/lengthier than aliases)). And in general, people add a few aliases and functions they personally want inside their 'bashrc' files. In mine, though, after a long while of looking at what commands (shortcuts) I wanted in mine, I decided to make one "ultimate' one, not just for myself, but to make it easier for others to have. As such, after a couple of years now, I have amassed quite a few aliases and functions. Personally, I use the entire thing (and some other commands I link to specific scripts and such that are on my computers). For some, they prefer to simply extract whatever shortcuts they desire the most, and put into their 'bashrc' files. Finally, when it comes to this one, I have 17,000 lines of code (ie, a WHOLE LOT of preset aliases and functions). You are welcome to change whatever 'shortcuts' you want, and use all that you want. It comes in extremely handy for longer commands. In addition, I find having a huge file of commands in one place EXTREMELY helpful when I need to do something. Hope that helps.

Zeroangel

I've been getting total system crashes when mistyping commands 'ie: kilall, apt-cache-search'. Apparently something in the .bashrc file causes all of the memory in the computer to get used up within seconds. I have had to restore my old .bashrc so that I could feel free to misspell commands without having to lose all my work.

inameiname

Hmmm, well I do not really know what to tell you. To narrow down what might be the issue, you can just cut certain parts of the bashrc and that will tell you what part might be causing that. My computer is not having this problem so I am afraid I cannot duplicate the issue. I suggest removing the 'Functions' section first to see if things work for you then; often any issues are due to a particular function.

inameiname

I found the issue. While my computer wouldn't freeze over the issue, if I were to type a misspelled word, it would simply leave the terminal frozen, until I would hit Control C. I deduced which part of the Bashrc was the culprit through trial and error, and found the problem. It was the function: command_not_found_handle. It was just added in my last update. Sorry about that. Just comment it out and it should work. I'll update the Bashrc for anybody else who has found this issue. Thanks for bringing it to my attention.

tonnyncorp

will like to thank you and everyone involved in creating this Ultimate bashrc. I feel naked without keep up the good work

inameiname

Actually it is just me and lots of free hours. Anyway, you're welcome.

tonnyncorp

from when i started to use that Ultimate bashrc to now many changes has happened for the better really appreciate is there any way i can communicate with you other then here ?

inameiname

Thanks again. Me too; it is hard remembering the several aliases and functions shortcuts I use. Uhm, well I welcome emails. I'm also on Ubuntu Forums, if you want to shoot me an email on there. I'm always welcoming to further communication.

linuxlex

Really excellent work.

inameiname

Thanks.

DDZ

Just installed Ultimate Bashrc File today. Many thanks for this great work !

inameiname

You're welcome.

gnumdk

.bashrc: line 1269: syntax error near unexpected token `(' .bashrc: line 1269: ` ?(-)c*f)'

inameiname

It has to do with the complete function, _tar and issues reading that particular few characters. Idk why its affecting you and not me. Easiest solution is to just delete or comment out that whole function from: function _tar() to complete -F _tar -o default tar on lines 1255-1308.

wallbangicus

I had the same error in arch linux. I removed the _tar function, but I got the same error in the extract function near line ~6000 (i edited the file) these errors seem to come from regexs in cases. the error is bash: .bashrc: line 6053: syntax error near unexpected token `(' bash: .bashrc: line 6053: ` *.t@(gz|lz|xz|b@(2|z?(2))|a@(z|r?(.@(Z|bz?(2)|gz|lzma|xz)))))' I am using perl 5.12.2 and bash 4.1.9

inameiname

Interesting.... Yes, it must be an inability to handle Regex characters or something in Arch Linux. Perhaps the reason it's not affecting me is because Ubuntu reads those differently, Idk. I'm guessing then you no longer have errors once you remove those Regex errors? I am using perl 5.10.1-12ubuntu2 and bash 4.1-2ubuntu4, the defaults for Ubuntu Maverick (10.10).

Pling
0 Affiliates
Details
license
version 4.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 7

More Various Gnome Stuff from inameiname:

The Ultimate List of Radio Stations
inameiname
last update date: 11 years ago

Score 6.5

gtk-jzintv (Intellivision Emulator)
inameiname
last update date: 14 years ago

Score 5.0

FragCheck and Defrag Tools
inameiname
last update date: 15 years ago

Score 5.0

The Ultimate Templates Pack
inameiname
last update date: 15 years ago

Score 5.7

Other Various Gnome Stuff:

Karuna OS Logo
JCL
last update date: 18 years ago

Score 5.0

Ubuntu for Sony Ericsson z520i
microscopuce
last update date: 18 years ago

Score 5.0

Ubuntu Studio for SE z520i
microscopuce
last update date: 18 years ago

Score 5.0

Ubuntu Humunity
noobilus
last update date: 14 years ago

Score 6.1

VDesk - Visual Desktop
AnthonyAMC
last update date: 13 years ago

Score 5.5

Youtube search function for gnome shell
rivetrik
last update date: 13 years ago

Score 5.0