Как установить apt в windows

Chocolatey


Chocolately is a package manager for Windows that works like apt-get. For example, choco install git. It has a wide variety of programs to choose from including Notepad++, Sublime Text, Chrome, 7zip, and others.

To sweeten the deal, they have a copy-paste command available here that will download and install Chocolatey, easy as pie.

The perfect icing for this chocolatey cake is Cmder. Cmder is a command line emulator that comes packaged with all of those Unix commands that you’ve come to know and love.

Chocolatey Packages Screenshot

[ Disclaimer : Chocolatey’s repository of packages isn’t nearly as extensive as apt-get’s ]

В настоящее время многие разработчики предпочитают работать на платформе Windows 10, в связи с ее удобством и широкими возможностями. Однако, до недавнего времени пользователи Windows сталкивались с трудностями в установке и использовании популярного менеджера пакетов apt-get, который является неотъемлемой частью линуксовых дистрибутивов Debian и Ubuntu. В данном руководстве мы рассмотрим процесс установки и использования apt-get на Windows 10, чтобы вы могли комфортно работать с этим инструментом.

apt-get – это мощный инструмент командной строки, который позволяет управлять пакетами в системе, устанавливать новые программы, обновлять уже установленные, а также удалять ненужные. Он обеспечивает простой и эффективный способ работы с пакетами, облегчая процесс установки и обновления программного обеспечения.

Первым шагом для установки apt-get на Windows 10 является установка пакета WSL (Windows Subsystem for Linux), который включает в себя подсистему Ubuntu на вашем компьютере. WSL позволяет вам запускать линуксовые приложения и использовать командную строку Ubuntu на платформе Windows.

Для установки WSL, откройте командную строку PowerShell от имени администратора и введите команду:

windows --list --all

После этого выберите требуемый дистрибутив, например, Ubuntu, и установите его с помощью команды:

windows --install --distribution=Ubuntu

После установки WSL вам потребуется создать нового пользователя и настроить несколько базовых настроек.

Установка apt-get на Windows 10

Вот пошаговая инструкция, как установить apt-get на Windows 10:

  1. Шаг 1: Установка Windows Subsystem for Linux (WSL)
  2. Перейдите в меню «Пуск» и откройте «Настройки». Затем выберите «Обновление и безопасность» и перейдите на вкладку «Для разработчиков». Включите режим разработчика и установите пакет Windows Subsystem for Linux (WSL).

  3. Шаг 2: Установка дистрибутива Linux
  4. После установки WSL, откройте магазин Microsoft и найдите дистрибутив Linux, который вам нравится (например, Ubuntu). Установите дистрибутив Linux на своем компьютере.

  5. Шаг 3: Запуск Linux-системы
  6. После установки дистрибутива Linux, запустите его и выполните необходимые настройки (например, создайте пользователя и установите пароль).

  7. Шаг 4: Установка apt-get
  8. Откройте терминал Linux и выполните следующую команду для установки apt-get:

    sudo apt-get install apt

    Дождитесь окончания установки. После установки, вы можете использовать apt-get для управления пакетами в своей системе.

Теперь вы знаете, как установить apt-get на Windows 10 и использовать его для управления пакетами. Этот метод позволяет вам использовать некоторые функции системы Linux на вашем компьютере с Windows 10.

Настройка и использование apt-get может быть полезным для разработчиков программного обеспечения или тех, кто предпочитает использовать инструменты Linux на своем компьютере.

Подготовка к установке apt-get

Прежде чем начать установку apt-get на операционной системе Windows 10, необходимо выполнить несколько предварительных шагов. В этом разделе мы рассмотрим необходимые действия для подготовки к установке apt-get.

1. Установите Windows Subsystem for Linux (WSL). WSL позволяет запускать Linux-среду прямо на Windows 10 и включает в себя apt-get и другие инструменты для управления пакетами. Для установки WSL откройте PowerShell от имени администратора и выполните следующую команду:

2. При установке WSL выберите дистрибутив Linux, который будет использоваться с apt-get. Рекомендуется выбрать Ubuntu или любой другой дистрибутив, поддерживающий apt-get.

3. Дождитесь завершения установки WSL и настройки дистрибутива Linux. После установки и настройки вы сможете запустить Linux-среду с помощью команды wsl или выбрав соответствующий сокращенный ярлык в меню «Пуск».

После завершения всех этих шагов вы будете готовы к установке apt-get на Windows 10 и сможете начать использовать его для управления пакетами в Linux-среде.

I was working mostly on Mac, so I have no idea about how to set up git environment on Windows 8.

Today, I was going to start AngularJS on my Windows Machine. On tutorial, I saw it requires git, and I downloaded the «Git for windows», called «MINGW64».

On tutorial, it asked me to use command:

apt-get install nodejs-legacy npm
nodejs --version
npm --version

Then, the bash told me

bash: apt-get: command not found

I was confused and thought the apt-get is a pre-installed thing, so I changed the git setting and re-installed it with all different settings. It still the same.

And I am so surprised that «sudo» is not found as well.

Next, I searched online and had many vague answer which directs to the path, I think that might be the issue, but the person did not clearly say how to solve it. I was hoping can get some help from Stack overflow community how can I install the apt-get and other basic commands packages on git for windows.

If it is a duplicate, please guide me a bit how to use the correct words to mention this issue. I have tried «git for windows has no apt-get», etc on Google, and no luck for me. This has bothered me whole night. Thanks!

Link for AngularJS Tutorial

Link for git for windows

Install Windows 10’s Ubuntu-based Bash shell and you’ll have a complete Ubuntu environment that lets you install and run the same applications you could run on an Ubuntu-based Linux system.

Quick Links

  • Apt-get Explained
  • How to Download Updated Package Lists
  • How to Install a Package
  • How to Search for a Package
  • How to Update All Your Installed Packages
  • How to Uninstall a Package
  • How to Install Other Software

Install Windows 10’s Ubuntu-based Bash shell and you’ll have a complete Ubuntu environment that lets you install and run the same applications you could run on an Ubuntu-based Linux system. Just like on Ubuntu, though, you’ll need the apt-get command to install and update software.

Note that Windows 10’s Linux subsystem doesn’t officially support graphical applications or server software (though it is possible to run some graphical applications, unofficially). Officially, it’s intended for Linux terminal applications and other command-line utilities developers might want.

Windows 10’s Bash shell only supports 64-bit binaries, so you can’t install and run 32-bit Linux programs.

Apt-get Explained

On Ubuntu and other Debian-based Linux distributions, you use the

 apt-get 

command to install software. «Apt» stands for «Advanced Package Tool». This command downloads software packages from Ubuntu’s centralized software repositories and installs them on your system. If the packages you try to install require—or «depend on»—other packages, apt-get will automatically download and install those packages (known as dependencies) as well. Apt-get works with «.deb» packages, named for Debian, the Linux distribution Ubuntu is based on.

You’ll need to run apt-get along with the «sudo» command, which gives it superuser, or root, permissions. This allows the command to modify and install system files in the Linux environment. You’ll have to enter your current user account’s password when you use sudo.

You can also use the newer apt command instead of the traditional apt-get command, although either command will work.

How to Download Updated Package Lists

First, you’ll want to run the following command to download up-to-date package lists from the software repositories:

sudo apt-get update

You’ll want to do this before you install any package.

How to Install a Package

If you know the name of a package you want to install, you can download and install it with the following command, replacing «packagename» with the name of the package you want to install:

sudo apt-get install packagename

For example, if you wanted to install Ruby, you’d run the following command:

sudo apt-get install ruby

You can press the Tab key while typing the name of a package (or any command) to use Bash’s autocomplete feature, which will help you automatically finish typing things and suggest available options, if multiple options are available.

After running this and other apt-get commands, you’ll be presented with the changes that will be made and you’ll have to type «y» and press Enter to continue.

How to Search for a Package

You may not always know the name of the package you want to install. In this case, you can use the apt-cache command to search your downloaded package cache (the lists that were download with apt-get update) for a program. This command searches package names and descriptions for the text you specify.

This command doesn’t require sudo, as it’s just a simple search. However, you can run it with sudo if you like, and it will still work.

apt-cache search sometext

For example, if you wanted to search for packages related to w3m, a text-based web browser for the terminal, you’d run:

apt-cache search w3m

How to Update All Your Installed Packages

To update your installed software packages to the latest available versions in the repository—which gives you any security updates available for your current packages—run the following command:

sudo apt-get upgrade

Remember to run the «sudo apt-get update» command before you run this command, as you need to update your package lists before apt-get will see the latest available versions.

How to Uninstall a Package

To uninstall a package when you’re done with it, run the following command:

sudo apt-get remove packagename

The above command just removes the package’s binary files, but not any associated configuration files. If you’d like to remove everything associated with the software package, run the following command instead:

sudo apt-get purge packagename

Neither of the above commands will remove any «dependencies,» which are packages that were installed because they were required for a package. If you uninstall a package and then remove it later, your system may still have a number of additional dependencies that are no longer necessary. To remove any packages that were installed as dependencies and are no longer required, run the following command:

sudo apt-get autoremove

How to Install Other Software

The above commands will help you install and update most common software you’ll require. However, some software will be installed through other commands and tools.

For example, Ruby gems are installed with the «gem install» command once you’ve installed Ruby via apt-get. Ruby has its own software installation system that’s separate from apt-get.

Some software packages are available in PPAs, or «personal package archives,» that are hosted by third parties. To install these, you’ll need to add the PPA to your system and then use the normal apt-get commands.

Newer software may need to be compiled and installed from source. All the packages you install with apt-get were compiled from source by Ubuntu’s build system and conveniently packaged into .deb packages you can install. You should avoid this if possible, but it may be unavoidable in some cases.

Whatever the case, if you’re trying to install another Linux application, you should be able to find instructions that tell you how you should install it. The same instructions that work on Ubuntu 14.04 LTS will work in Windows 10’s Bash shell. When it’s updated to the next major version of Ubuntu, the same instructions that work on Ubuntu 16.04 LTS will work on Windows 10.

In 2013 I asked the questions «Is the Windows user ready for apt-get?» As with nearly all my blog posts, the comments are better than the post itself. ;)

Now it’s 2015 and many of us are upgrading to Windows 10. One of the little gems in Windows 10 that no one is talking about (yet) is OneGet. You can read about OneGet architecture here.

Installing applications in Windows 10 from the command line

It’s easy (and wrong) to just say that One-Get is Apt-Get for Windows. But OneGet isn’t actually a package manager. It’s more clever and cooler than that.  It’s a package manager manager.

OneGet is a Manager of Package Managers 

Go out to you Windows 10 PowerShell prompt now and type «Get-PackageProvider» and you’ll see the package managers you have registered with OneGet today.

C:\> Get-PackageProvider

Name Version
---- -------
Programs 10.0.10240.16384
msu 10.0.10240.16384
msi 10.0.10240.16384
PSModule 1.0.0.0

Usually programs are installed with things like MSIs, for example, so there’s a provider for that. You can type «Get-Package» and see the programs AND packages on your machine:

C:\> Get-Package

Name Version
---- -------
123D Design R1.6 1.6.41
Windows Driver Package - Ge... 06/04/2011 8....
Windows Driver Package - Ge... 06/19/2014 8....
Windows Driver Package - FT... 01/27/2014 2....
JRuby 1.7.19 1.7.19
Windows Driver Package - ST... 11/09/2009 3....
EPSON NX410 Series Printer ...
Intel Edison Device USB driver 1.2.1

Since it’s PowerShell, you can sort and filter and what-not to your heart’s delight.

OneGet isn’t Microsoft’s Chocolately

Chocolatey is an open source apt-get-like machine-wide package manager that you can use today, even if you don’t have Windows 10.

OneGet isn’t Microsoft’s version of Chocolately. But there is a beta/preview Chocolatey provider that plugs into OneGet so you can use OneGet to get Chocolatey packages and install them.

Other things worth noting, even though OneGet is in the box for Windows 10, you can still run it on Windows 7 and Windows 2008 R2. Plus, OneGet isn’t done and it’s open source so there’s lots of cool possibilities.

Oh, and an important naming point. Just like «Chromium» is the open source browser and «Chrome» is the Google packaged instance of that project, «OneGet» is the open source project and what ships with Windows 10 is just generically «PackageManagement.» Just a good reminder of the relationship between open source projects and their shipping counterparts.

Installing VLC using OneGet and Chocolatey on Windows 10

Example time. You’ve got a new Windows 10 machine and you want to get VLC. You can (and should) totally get it from the Windows Store, but let’s get it using Package Management.

Here I need to get the beta Chocotlatey provider first, and once, with «get-packageprovider -name chocolatey.» Also, when I install a package for the first time it will prompt to download NuGet as well. I will answer Yes to both.

NOTE: You can also install Chocolatey explicitly with «install-package –provider bootstrap chocolatey»

Now I can just «install-package vlc» and it will get it from the Chocolatey repository.

C:\>  get-packageprovider -name chocolatey

The provider 'chocolatey v2.8.5.130' is not installed.
chocolatey may be manually downloaded from https://oneget.org/ChocolateyPr30.exe and installed.
Would you like PackageManagement to automatically download and install 'chocolatey'?

[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y

Name Version
---- -------
Chocolatey 2.8.5.130

C:\> install-package vlc

The provider 'nuget v2.8.5.127' is not installed.
nuget may be manually downloaded from https://oneget.org/nuget-anycpu-2.8.5.127.exe and installed.
Would you like PackageManagement to automatically download and install 'nuget' now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y

The package(s) come from a package source that is not marked as trusted.
Are you sure you want to install software from 'chocolatey'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): y

Name Version Source Summary
---- ------- ------ -------
vlc 2.2.1.20150630 chocolatey VLC Media Player

Boom. Now VLC is installed. It’s early days but it’s interesting stuff!

You can read about the available OneGet cmdlets at https://github.com/OneGet/oneget/wiki/cmdlets.

For example here I can find the latest version of zoomit.

C:\> find-package -name zoomit

Name Version Source
---- ------- ------
zoomit 4.50 chocolate

Just to be clear, with regards to OneGet and Chocolatey.

  1. It’s an unsupported version of Chocolatey provider in a GitHub repo
  2. Folks can download it using OneGet cmdlets and then using the unsupported provider, you can download Chocolatey packages.
  3. Microsoft is working with the community to take ownership of Chocolatey provider.

And again, you can use Chocolatey TODAY on your Windows 7 and up machines as it is.

Managing MSI-installed Programs with OneGet and PackageManagement

OneGet and PackageManagement in Windows 10 lets you manage package managers of all kinds to control what’s installed one your machines. For example, I can uninstall an MSI installed program like this. This is just like visiting Add/Remove Programs (ARP) and uninstalling, except I did it from the command line!

C:\> Uninstall-Package join.me.launcher

Name Version
---- -------
join.me.launcher 1.0.368.0

MSI and Chocolately are just the start for OneGet. What if one package management API could also get Python or PHP packages? Windows Store apps?

Donate to help Chocolatey

Last, but definitely not least, it’s important to remember that Chocolatey and the Chocolatey Repository of Packages can use your help and sponsorship. Head over to https://chocolatey.org/ and scroll to the bottom and click Donate and you can Paypal or use your Credit Card to help them out.

SOCIAL: Hey folks, please do follow me on Facebook https://fb.me/scott.hanselman or Twitter! https://twitter.com/shanselman


Sponsor: Big thanks to our friends at Infragistics for sponsoring the feed this week! Responsive web design on any browser, any platform and any device with Infragistics jQuery/HTML5 Controls.  Get super-charged performance with the world’s fastest HTML5 Grid -Download for free now!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook
twitter
subscribe
About   Newsletter

Hosting By
Hosted in an Azure App Service

  • Как установить 12 часовой формат времени на windows 10
  • Как установить adobe after effects на windows
  • Как установить android приложения на windows 10
  • Как установить appx на windows 10 без магазина
  • Как установить adobe acrobat reader бесплатно для windows 7