Skip to content

Instantly share code, notes, and snippets.

@kaipm
Last active August 13, 2023 18:17
Show Gist options
  • Save kaipm/64f79ed6c74e6852c4a6b10aeae53b91 to your computer and use it in GitHub Desktop.
Save kaipm/64f79ed6c74e6852c4a6b10aeae53b91 to your computer and use it in GitHub Desktop.
Cheat Sheet

Virtual Box

Converting images

You can convert real linux disk images into VBox images:

VBoxInstallDir\VBoxManage convertdd source.img target.vdi --format VDI

Linux

Extracting files

  • tar -xzf file.tar.gz for GZIP
  • tar -xJf file.tar.xz for XZ

Python

Virtual environments

  • For python 2: python2.7 and python-virtualenv
  • For python 3: python3 and python3-virtualenv
virtualenv -p /bin/python2.7 /home/user/my2.7

Repair virtualenv

  1. Create a new virtualenv for your version
  2. Copy lib/python2.7/site-packages from the old env to the new one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment