Skip to content

Both.org

News, Opinion, Tutorials, and Community for Linux Users and SysAdmins

Primary Menu
  • About Us
  • Computers 101
    • Hardware 101
    • Operating Systems 101
  • End of 10 Events
    • Wake Forest, NC, — 2025-09-20
  • Linux
    • Why I use Linux
    • The real reason we use Linux
  • My Linux Books
    • systemd for Linux SysAdmins
    • Using and Administering Linux – Zero to SysAdmin: 2nd Edition
    • The Linux Philosophy for SysAdmins
    • Linux for Small Business Owners
    • Errata
      • Errata for The Linux Philosophy for SysAdmins
      • Errata for Using and Administering Linux — 1st Edition
      • Errata for Using and Administering Linux — 2nd Edition
  • Open Source Resources
    • What is Open Source?
    • What is Linux?
    • What is Open Source Software?
    • The Open Source Way
  • Write for us
    • Submission and Style guide
    • Advertising statement
  • Downloads
  • Home
  • Why sysadmins should license their code for open source
  • Code
  • License
  • Linux

Why sysadmins should license their code for open source

David Both December 13, 2023 6 minutes read
code_development_programming

One of the best ways I know to give back to the open source community that provides everyone with incredible programs is to make programs and scripts open source using an appropriate license.

As a Linux system administrator, I write a fair amount of code.

Does that surprise you? Well, I strive to be the “lazy” sysadmin, and I do this, in part, by reducing the number of repetitive tasks I need to do by automating them. Most of my automation started as little command-line programs. I store those in executable scripts for re-use at any time on any Linux host for which I have responsibility.

The problem with sharing unlicensed Code

I also like to share my code. I think that, if my code has helped me to resolve a problem, it can also help other sysadmins resolve the same or similar problems. This is, after all, the essence of open source — the sharing of code. While code sharing is a good thing, legal issues can prevent perfectly good code from being used as intended by the developer.

The primary problem is that many companies have legal departments that require them to keep copies of licenses. This makes it easy to understand their rights and obligations. Software without a license attached to it in any way becomes a legal liability. This is because there is no basis upon which to determine whether the code can be used legally or not. This can prevent perfectly good code from being used by many companies and individuals.

Why I license my code

One of the best ways I know to give back to the open source community that provides everyone with incredible programs like the GNU Utilities, the Linux kernel, LibreOffice, WordPress, and thousands more, is to make programs and scripts open source using an appropriate license.

Just because you write a program, believe in open source, and agree that programs should be open source code, does not make it open source. As a sysadmin, I do write a lot of code, but how many of you ever consider licensing your own code?

You have to make the choice to explicitly state that your code is open source, and decide which license you want it to be distributed under. Without this critical step, the code you create is functionally proprietary. This means the community cannot safely take advantage of your work.

You should include the GPLv2 (or your other preferred) license header statement as a command-line option that prints the license header to the terminal. When distributing code, I also recommend that you include a text copy of the entire license along with the code (it’s a requirement of some licenses.)

A few years ago, I read an interesting article, The source code is the license that helps to explain the reasoning behind this.

I find it very interesting that in all of the books I have read, and all of the classes I have attended, not once did any of them tell me to include a license for the code I wrote in my tasks as a sysadmin. All of these sources completely ignored the fact that sysadmins write code too. Even in the conference sessions on licensing I’ve attended, the focus was on application code, kernel code, and even GNU-type utilities. None of the presentations so much as hinted that you should consider licensing it in any way.

Perhaps you’ve had a different experience, but this has been mine. At the very least, this frustrates me — at the most it angers me. You devalue your code when you neglect to license it. Many sysadmins don’t even think about licensing, but it’s important if you want your code to be available to the entire community. This is about neither credit nor money. This is about ensuring that your code is, now and always, available to others in the best sense of “free and open source.”

Eric Raymond, author of the 2003 book, The Art of Unix Programming writes that in the early days of computer programming and especially in the early life of Unix, sharing code was a way of life. In the beginning, this was simply reusing existing code. With the advent of Linux and open source licensing, this became much easier. It meets the needs of system administrators to be able to legally share and reuse open source code.

Raymond states, “Software developers want their code to be transparent. Furthermore they don’t want to lose their toolkits and their expertise when they change jobs. They get tired of being victims, fed up with being frustrated by blunt tools and intellectual-property fences and having to repeatedly reinvent the wheel.” This statement also applies to sysadmins — who are also, in fact, software developers.

How I license my code

I mentioned adding an option to print the GPL (or other) license header as a command line option. The code below is a procedure that does so:

#############################################
# Print the GPL license header              #
#############################################
gpl()
{
echo
echo "############################################################"
echo "# Copyright (C) 2023 David Both                            #"
echo "# http://www.both.org                                      #"
echo "#                                                          #"
echo "# This program is free software; you can redistribute it   #"
echo "# and/or modify it under the terms of the                  #"
echo "# GNU General Public License as published by the           #"
echo "# Free Software Foundation; either version 2 of the        #"
echo "# License, or (at your option) any later version.          #"
echo "#                                                          #"
echo "# This program is distributed in the hope that it will be  #"
echo "# useful, but WITHOUT ANY WARRANTY; without even the       #"
echo "# implied warranty of MERCHANTABILITY or FITNESS FOR A     #"
echo "# PARTICULAR PURPOSE. See the GNU General Public License   #"
echo "# for more details.                                        #"
echo "#                                                          #"
echo "# You should have received a copy of the GNU General       #"
echo "# Public License along with this program; if not, write    #"
echo "# to the Free Software Foundation, Inc., 59 Temple Place,  #"
echo "# Ste 330, Boston, MA 02111-1307 USA                       #"
echo "############################################################"
echo
} # End of gpl()
end

That’s the license, included as a function. You can add an option to the code. I like to place the new case sections in alphabetical order to make them a bit easier to find when performing maintenance. This is the GPL, so I chose g as the short option:

#########################################
# Process the input options             #
#########################################
# Get the options
while getopts ":ghc" option; do
case $option in
   c) # Check option
      Check=1;;
   g) # display the GPL header
      gpl
      exit;;
   h) # Help function
      Help
      exit;;
   \?) # incorrect option
      echo "Error: Invalid option."
      exit;;
   esac
done
end

These two bits of code are all that’s needed to add a legitimate and enforceable license to your program.

Final thoughts

I always license all of my code. I recently presented a session on Bash at OLF (Open Libre Free, which used to be known as Ohio Linux Fest). Instead of using LibreOffice Impress for my presentation, I used a Bash program for the entire thing. After all, it is a presentation about Bash so why not make it a Bash program.

I did include my license code in that Bash program. That way everyone who encounters a copy of my program knows that it’s properly licensed under GPLv3, and that they can use and modify it under the terms of that license. My code is the license.

Post navigation

Previous: Embracing Freedom and Flexibility: Why Linux Mint Could be Your Perfect OS Choice
Next: Wordsmith on the Linux command line with dict

Related Stories

Rows of old fashioned alarm clocks.
  • Linux
  • SysAdmin

Changing the timezone in Fedora

Jim Hall May 11, 2026
wfh_work_home_laptop_work
  • Advanced
  • Command Line
  • Linux
  • Tools

Beyond the Basics: Advanced Text Processing with awk and sed

Saikat Goswami May 8, 2026
retro_old_unix_computer
  • Fortran 77
  • Linux
  • Programming

5 things to know when learning FORTRAN 77

Jim Hall May 6, 2026

Random Quote

Computers are easy; People are hard.

— Bridget Kromhout

Why I’ve Never Used Windows

On February 12 I gave a presentation at the Triangle Linux Users Group (TriLUG) about why I use Linux and why I’ve never used Windows.

Here’s the link to the video: https://www.youtube.com/live/uCK_haOXPFM 

Why there’s no such thing as AI

Last October at All Things Open (ATO) I was interviewed by Jason Hibbits of We Love Open Source. It’s posted in the article “Why today’s AI isn’t intelligent (yet)“.

Technically We Write — Our Partner Site

Our partner site, Technically We Write, has published a number of articles from several contributors to Both.org. Check them out.

Technically We Write is a community of technical writers, technical editors, copyeditors, web content writers, and all other roles in technical communication.

Subscribe to Both.org

To comment on articles, you must have an account.

Send your desired user ID, first and last name, and an email address for login (this must be the same email address used to register) to subscribe@both.org with “Subscribe” as the subject line.

You’ll receive a confirmation of your subscription with your initial password as soon as we are able to process it.

Administration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

License and AI Statements

Both.org aims to publish everything under a Creative Commons Attribution ShareAlike license. Some items may be published under a different license. You are responsible to verify permissions before reusing content from this website.

The opinions expressed are those of the individual authors, not Both.org.

You may not use this content to train AI.

 

Advertising Statement

Both.org does not sell advertising on this website.


Advertising may keep most websites running—but at Both.org, we’re committed to keeping our corner of the web ad-free. Both.org does not sell advertising on the website. Nor do we offer sponsored articles at this time. We’ll update this page if our position on sponsorships changes.

We want to be open about how the website is funded. Both.org is supported entirely by David Both and a few other dedicated individuals.

 

 

Copyright © All rights reserved. | MoreNews by AF themes.