Home

Awesome

Linux 'Comfy Chair'

You know how it is; your own Linux is set up like your favourite comfy chair - everything is close to hand, set up the way you want, and there are no surprises. That's why it's so annoying to set up a new computer or virtual machine, especially if you are testing stuff (like this script!!) that needs both a certain amount of installed dependencies and a dependable state.

Hence this script. This is the evolution of my previous work to bootstrap a new Raspberry PI system and Windows 10 'WSL', but for pure (Debian Based) Linux. Primary usage and testing has been done with Ubuntu though it should now work with any Debian-based distribution. Note that the script will only run on debian-based distributions (Debian, Ubuntu, Kali, Mint etc etc) as well as Raspberry PI or WSL variants on those.

Note that the script is geared towards and tested on server versions more than Desktop ones, though it has been used successfully on both. In fact my primary day-to-day machine runs Ubuntu Desktop (22.04) which was set up using this script.

Compatible Linux systems

This script has been tested on the following systems:

If you have experience (good or bad) running this script on other hardware, cpu and Debian-based OS's please get in touch and I will add to the list, or fix the problem 😁

Prerequisites

At the absolute minimum, you need a working system that you can log into, either locally or over ssh. The only 2 other absolute requirements are that git and sudo are installed. In 99% of cases, they will be. Some minimal images may not have these - for example, the standard Docker Ubuntu image does NOT, nor does a minimal (non-GUI, network install) installation of Debian Bullseye. The script will install any other missing base dependencies that are critical for the rest of the script to function.

Note: WSL2 (Windows Subsystem for Linux)

This system has also been tested on Ubuntu 20.04 running under WSL2 and works perfectly as far as I can see with the below caveats:

If WSL is detected, the package ubuntu-wsl will also be installed if missing. This should already be there in the official Ubuntu image, but probably not custom ones

I have moved away from using WSL, as I have migrated to Linux full-time for my development and day-to-day machine, however, I will try to test on WSL and fix any errors for each official release.

Note 2: Currently only for bash shell

The script writes configuration settings to .bashrc, which will mean lack of functionality under Zsh and others. I now use Zsh myself almost exclusively, so this will likely be fixed in future releases.

As a result, under Zsh and others the Pyenv/Rbenv/NVM etc will not work at this time, though you can certainly move the relevant sections from the .bashrc to the .zshrc

General Information

The script works on a bare newly installed system and provides the following functionality :

You can enable or disable each module by commenting out the relevant section in the comfy-chair.sh script.

Security

Please be aware that no attempt has been made to Secure or harden the final Linux system. This is something you will need to do yourself. Indeed, if your server is public, I'd advise that a very restrictive firewall blocking everything IN except for SSH is the first thing you do before even running this script! No responsibility will be taken for security breaches on systems set up with this script.

Current Issues/Bugs

Usage

The simplest way to use this script is to clone into a completely new clean Operating System.

From the terminal run the following commands:

git clone https://github.com/seapagan/linux-comfy-chair.git
cd linux-comfy-chair
./comfy-chair.sh

Default branch has been renamed

In line with many Open-Source projects, I have renamed the Default branch from master to main. If you have already cloned or forked this repository, please run the following commands in your local copies :

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Optionally, also remove any tracking references to the old branch name :

git remote prune origin

To-Do

Further proposed modules

Contributing

Please do feel free to open an Issue for any errors or missing dependencies you find, or even a Pull Request with solutions 😎

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request