Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Codacy Badge CircleCI GitHub issues GitHub

Scripts that installs selective base user packages and extensions for initial setup of users workspase in Ubuntu/Fedora.

Files TOC

  • Root:
    • ./
    • ./
  • Extensions dir:
    • ./ext/
    • ./ext/
    • ./ext/
    • ./ext/
    • ./ext/
  • Applications dir:
    • ./apps/
    • ./apps/
    • ./apps/
  • Dotfiles dir:
    • ./dots/
    • ./dots/bash/.profile
    • ./dots/bash/.bashrc
    • ./dots/bin/
    • ./dots/bin/bin/
    • ./dots/bin/bin/
    • ./dots/bin/bin/
    • .dots/git/.gitconfig
    • .dots/
    • .dots/zsh/.zshrc

What the scripts do

  1. The script determines what Linux distributin it's running on and installs the predefined base packages and applications
  2. The script installs all predefined snaps and Python3 pip packages, extensions for Gnome-Shell, VSCode and ZSH via supscripts from the ./apps and ./ext/ dirs, along with running the script from the ./dots/ dir, which uses the stow command to link the dotfiles in place under $HOME

Basic usage

If git is installed on the system

git clone
cd ./initial-package-install
# Run the initial install as root with sudo, then post install for snap, pip and extensions
sudo ./; ./

If git is not already installed on the system

# Try curl, else fall back to wget
curl -L -O || wget -L -O
sudo ./

# Now we have git, so lets clone the repo and finish the install
rm -Rf ./
git clone
cd ./initial-package-install

Dotfiles and the script

Remember to replace or modify the dotfiles to your needs:

Example usage of the stow command

stow -v -R -t ~ git
# Output
LINK: .gitconfig => ./dots/git/.gitconfig
ls -latr ~ | grep .git
# Output
lrwxrwxrwx  1 USER USER       28 jun 21 16:55 .gitconfig -> ./dots/git/.gitconfig

-v is verbose, -R is recursive, and -t ~ is the target directory, e.g your Home ($HOME) directory.

As you can see, it's relatively straight forward and simple to use.. In the code above, we will install the git directory for only the local user as root doesn’t need that. However bash which we will do next, can be used for both local users and root. We then create a bash function named stowit to run the actual stow command with our required arguments. The first loop is to install folders for any user, and the second has a check to install for any user unless it is the root user. So lets setup the bash directory.

Example output from

# Run
# Output
Stowing apps for user:
LINK: .profile => ./dots/bash/.profile
LINK: .bashrc => ./dots/bash/.bashrc
LINK: .gitconfig => ./dots/git/.gitconfig
LINK: .zshrc => ./dots/zsh/.zshrc

All done!

You can see that stow is pretty smart about linking our files and folders. It linked our new bash files. But when we ran stow again it went through our previously linked git files, re re-linked them. You can actually configure how that handles those situations with different flags. stow will also abort stowing folders when it finds new files that have not been stowed before and will tell you what files so you can fix them.

To install the files for root, simply use sudo

sudo ./

The bin directory

Inside the ./dots/bin/bin folder we can place any binary files and scripts we want to keep around for our system.

Add export path to .zshrc or .bashrc

# Example with .zshrc
vim ~/.zshrc
export PATH="$HOME/bin:$PATH"
source ~/.zshrc
# Lets check and verify our path
echo $PATH

We now have /home/USER/bin in our path where we can use to store all our scripts and files that we need to run in our environment as an alternative to /usr/local/bin.


Script that installs the selective user packages for Ubuntu/Fedora







No releases published


No packages published