How to unzip a file using git bash (Windows)?
23,485
Install the latest git (git-bash) from https://git-scm.com/downloads - at the time of writing it is the 2.10.0 version. It comes with unzip packaged inside as one of the tools. Check optional unix tools during setup if you already use gitbash as your go-to console.
Comments
-
claudios over 2 years
Is there a piece of code to unzip a file using git bash on windows? I tried unzipping with this line of code:
unzip somefile.zip
and it returns a
bash: unzip: command not found
-
negas almost 4 yearssudo in windows?
-
Stefan almost 4 yearsYes, Windows has a linux subsystem. In fact it supports multiple simultaneous subsystems. See here: docs.microsoft.com/en-us/windows/wsl/install-win10
-
Gino Mempin over 3 yearsThis was also mentioned in this other answer, where it said unzip is available as of 2.10.
-
joanis over 2 yearsAs far as I know, this only works for opening gzip'd archves, like
.tar.gz
or.tgz
, but not for zip files. -
LinuxDisciple over 2 yearsThe question specifically says Git Bash. WSL is off-topic.
-
Stefan over 2 years@LinuxDisciple How so? I use Git in WSL Bash all the time, as do many people.
-
LinuxDisciple over 2 years
git-bash
(see OP's tag) is a Windows program that emulates the Bash terminal. It's a completely different environment from WSL.