Skip to content

Instantly share code, notes, and snippets.

@MadMaxMcKinney
Last active March 23, 2017 15:52
Show Gist options
  • Save MadMaxMcKinney/85de6e744142f851c17c7f447a5d1008 to your computer and use it in GitHub Desktop.
Save MadMaxMcKinney/85de6e744142f851c17c7f447a5d1008 to your computer and use it in GitHub Desktop.
Ubuntu Useful CLI Commands

View installed PPA Repository with a .sh script

#! /bin/sh 
# listppa Script to get all the PPA installed on a system ready to share for reininstall
for APT in `find /etc/apt/ -name \*.list`; do
    grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" $APT | while read ENTRY ; do
        USER=`echo $ENTRY | cut -d/ -f4`
        PPA=`echo $ENTRY | cut -d/ -f5`
        echo sudo apt-add-repository ppa:$USER/$PPA
    done
done

Add PPA repositories

sudo add-apt-repository ppa:PPALINKHERE

Update repositories

sudo apt-get update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment