I made a set of custom scripts for Ubuntu. I wish to share these on the Internet. Which services for sharing code with other users are available ?

  • 2
    github.com is kinda always the way to go. Or launchpad.net
    – Parto
    Jan 4, 2017 at 8:45
  • 2
    I'm voting to close this question as off-topic because it is not about Ubuntu but about sharing scripts online.
    – terdon
    Jan 4, 2017 at 12:17

3 Answers 3


There's several options , which differ in their purpose and complexity. You may choose whichever you wish.

  • Ubuntu pastebin: http://paste.ubuntu.com is simplest approach to sharing, but also the worst. The links aren't permanent, as far as I know, and you can only paste code, i.e. you cannot edit it. If you want to just share script with a few friends, that's the way to go.
  • Ask Ubuntu itself is a good place to share solutions. Of course, the scripts have to be within the scopes of question where you wanna post. As a benefit, if your code is found useful, community will upvote answers. Keep in mind that anything you post is under creative commons license, so expect people will have essentially full access to the code. If you want to have it copyrighted, you can use explicit license in the script ( preferably open source one).
  • Software repository wesbites, such as GitHub, GitLab, and SourceForge. Most famous is GitHub. This is one of the options that I personally use. It's not very complicated, you can get around only with the web interface alone. GitHub also has something known as Gists. You can publish a script as public or private gist, and give link to it. GitHub repository is more for a collection of specific files that tie in together somehow, and usually is for large applications. Feel free to see my gists and repositories.
  • Launchpad. This is somewhat a more complex option. Users can add your PPA and install the scripts via sudo apt-get install package-name. Follow launchpad's tutorials to get started. There's couple ways to upload code there( see discussion in comments below). Use this as reference for creating deb packages for single scripts - these can be imported to Launchpad and built using Launchpad before placing into PPA. IMHO, single script that is not over 100 lines , isn't worth putting into deb package and then on Launchpad. GitHub gist is simpler for small scripts.
  • Containers and snaps. This is also somewhat more advanced option. The big plus is portability. Most famous cross-platform container options are Docker and Snap packages. Docker has its own store: https://hub.docker.com/ I don't know about snaps,though. To my knowledge there is no app store for those.
  • Nice overview! One thing: for a ppa on launchpad, I only upload the changes file, no built .deb packages needed. Jan 4, 2017 at 10:08
  • @JacobVlijm well, your setup is different from mine slightly. The way I do is import my stuff from github and build deb packages on launchpad. Other devs might have different approach,too. Jan 4, 2017 at 10:11
  • Absolutely, only referring to "you have to upload script as deb package", but again, great overview, and a nice question. Jan 4, 2017 at 10:13
  • 2
    In addition to the other repository wesbites mentioned, there is also Bitbucket. Jan 4, 2017 at 11:19

GitHub is a good choice of sharing code.


GitHub is a great place for sharing code - But be sure to include a description of the scripts, how to use them and what their primary function is.

If your intention is to share your work and allow others to use them you will have to enable them to understand your scripts easily. You may also find that members of the community who use your scripts offer to contribute improvements and offer you support with updating and fixing any issues that may arise.

Not the answer you're looking for? Browse other questions tagged .