版本管理工具git的安装(一)

本文详细介绍了在多种Linux/UNIX系统中安装Git的方法,包括Debian/Ubuntu、Fedora、Gentoo等,提供了使用包管理器的快速安装方式,以及从源代码构建的步骤,适用于不同需求的用户。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. LINUX/UNIX下git工具的安装及安装(默认自动)

Download for Linux and Unix
It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. If you prefer to build from source, you can find the tarballs on kernel.org.

Debian/Ubuntu
For the latest stable version for your release of Debian/Ubuntu

Download for Linux and Unix
It is easiest to install Git on Linux using the preferred package manager of your Linux distribution. If you prefer to build from source, you can find the tarballs on kernel.org.

Debian/Ubuntu
For the latest stable version for your release of Debian/Ubuntu

# apt-get install git

For Ubuntu, this PPA provides the latest stable upstream Git version

# add-apt-repository ppa:git-core/ppa # apt update; apt install git

Fedora

# yum install git (up to Fedora 21)
# dnf install git (Fedora 22 and later)

Gentoo

# emerge --ask --verbose dev-vcs/git

Arch Linux

# pacman -S git

openSUSE

# zypper install git

Mageia

# urpmi git

Nix/NixOS

# nix-env -i git

FreeBSD

# pkg install git

Solaris 9/10/11 (OpenCSW)

# pkgutil -i git

Solaris 11 Express

**# pkg install developer/versioning/git

OpenBSD**

# pkg_add git

Alpine

$ apk add git

Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.

Slitaz

$ tazpkg get-install git

For Ubuntu, this PPA provides the latest stable upstream Git version

# add-apt-repository ppa:git-core/ppa # apt update; apt install git

Fedora

# yum install git (up to Fedora 21)
# dnf install git (Fedora 22 and later)

Gentoo

# emerge --ask --verbose dev-vcs/git

Arch Linux

# pacman -S git

openSUSE

# zypper install git

Mageia

# urpmi git

Nix/NixOS

# nix-env -i git

FreeBSD

# pkg install git

Solaris 9/10/11 (OpenCSW)

# pkgutil -i git

Solaris 11 Express

# pkg install developer/versioning/git

OpenBSD

# pkg_add git

Alpine

$ apk add git

Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.

Slitaz

$ tazpkg get-install git
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值