Package management commands

Install package

sudo apt install → Install something with apt

sudo dpkg -i → Install .deb file

Remove packages

dpkg --list → Find package

dpkg -r something.deb → Remove debian package

sudo apt --purge remove nameOfProgram → Remove program

sudo apt autoremove → Remove dependecies left behind

Organizing $PATH variable

source /etc/environment && export PATH → Define the path

If using zhs:

sudo vim /etc/zsh/zshenv
source /etc/environment #add this to the file

Adding a path

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin → Non-presistent way to add binaries to the path

tar and gzip

gzip myfile → Compress a file with gzip

gunzip myfile.gz → Decompress a file ith gzip

tar cvd myfile.tar myfile1 myfile2 → Create and add files to a tar archive

tar xvf myfile.tar → Unpacking archives with tar

tar vzf myfile.tar.gz → Create a compressed tar file with tar and gzip

tar xzf myfile.tar → Uncompress and unpack tar file with tar and gzip

Last updated

Was this helpful?