One thing you will swiftly learn while trying to solve problems, learn how to do things, and generally share code in Linux, is that websites like and the like are very very useful. Cutting and pasting your code, or terminal output, or anything else, can get a bit boring though.
Enter Pastebinit, a handy little command-line tool that lets you upload a file, or pipe a terminal output, to a choice of different Pastebin websites.
It’s easy to install, if you have Ubuntu you can just pull it off the repositories:
sudo apt-get install pastebinit
You can either pass a file to it directly as an argument:
$ pastebinit /etc/X11/xorg.conf
or pipe output through it:
$ ps aux | pastebinit
It requires either a filename, or piped data, as an argument. The main options are -b [url of pastebin] and -a [author].
man pastebinit will show you a few more.
This tool is great for troubleshooting from the terminal, especially if you haven’t got access to a browser for some reason, or just generally for being lazy when sharing information. You can also use it if you’re working on some document in an editor, and you want to ask someone else for their opinion, eg for content checking. All in all, a very handy tool for the lazy!