- Copy and Paste arrives for Linux/WSL Consoles
- Как работать с Linux используя Windows
- Ubuntu из Microsoft Store
- VirtualBox
- Copy paste not working on Virtual box 6.1 running Ubuntu 18.04 on Windows 10 Machine
- 6 Answers 6
- Permission Error copying files into Ubuntu on Windows with Windows copy/paste
- 4 Answers 4
- Ubuntu on windows paste
- 2. Requirements
- 3. Enable WSL
- 4. Install Ubuntu for Windows 10
- 5. Launch Ubuntu on Windows 10
- First launch
- 6. Getting help
Copy and Paste arrives for Linux/WSL Consoles
April 13th, 2018
As of Windows 10 Insider build #17643, you can copy/paste text from/to Linux/WSL Consoles.
We know that this is a feature MANY of you have been waiting for – our sincerest thanks for your patience & continued support while we untangled the Console’s internals, allowing us to implement this feature.
To ensure that we don’t break any existing behaviors, you’ll need to enable the “Use Ctrl+Shift+C/V as Copy/Paste” option in the Console “Options” properties page:
With the new copy & paste option selected, you’ll be able to copy and paste text using [CTRL] + [SHIFT] + [C|V] respectively.
Note: This setting can be set independently for each shell or shortcut: If you pin your shortcuts to your favorite shells (e.g. Cmd/PowerShell/Linux) to your task bar, and modify the properties of Consoles launched via these shortcuts, your settings will only be made to the affected shortcuts. If you later launch the same shell via the Start menu, or the run dialog, your settings will not be found as they’ll have been saved to your pinned shortcuts, not your Start menu tiles/shortcuts, or registry settings. Please let us know how you get on with this feature If you find any issues, please lookup/post issues on our GitHub issues repo. If you have other feature asks, please find & upvote, or post them on our UserVoice
Rich Turner
Sr. Program Manager, Windows Console & Command-Line
Как работать с Linux используя Windows
Инструкция по установке Ubuntu Linux внутри Windows с использованием различных технологий виртуализации.
Содержание
Если вы только начали свой путь разработчика и до сих используете операционную систему семейства Microsoft Windows, то уже наверняка столкнулись с ситуацией, когда ваш инструментарий отличается от того, что установлено у большинства людей из этой профессии. Чаще всего проблемы начинаются при работе в командной строке. Дело в том, что Windows не является POSIX-совместимой операционной системой, поэтому в ней отсутсвует базовый набор прикладных программ, который необходим для разработки.
Этот вопрос можно решить установкой какого-либо из многочисленных дистрибутивов Linux в качестве основной, либо альтернативной операционной системы. Для новичков есть способ проще и быстрее — технологии виртуализации. Об этом и поговорим.
Ubuntu из Microsoft Store
Если вы работаете на Windows версии 10 с архитектурой x64, то можно можно воспользоваться встроенным решением и установить слой совместимости (Windows Subsystem for Linux) на основе Ubuntu Linux через магазин приложений Microsoft Store.
Перед тем как начать, необходимо убедиться, что системные требования соответствуют рекомендованным. Для этого запустите приложение Microsoft Store, введите в графе поиска Ubuntu и перейдите по найденной ссылке. Если ранее Windows не обновлялся, то вероятней всего вы получите соответствующее указание сделать это до начала установки Ubuntu. Если всё OK, то нажимайте на кнопку «Получить» и через несколько минут (в зависимости от скорости интернет соединения) вы получите сигнал об успешной установке приложения.
Первый запуск может вызвать ошибку Error: 0x8007007e и предложение прочитать инструкцию по её решению https://aka.ms/wslinstall. Если хотите сэкономить время, то просто запустите PowerShell (не путать с cmd ) от имени администратора и выполните следующую команду:
После этого компьютер попросит перегрузиться, а потом нужно снова запустить приложение Ubuntu. В случае удачной установки откроется интерпретатор командной строки с предложением ввести имя пользователя и пароль. Выглядеть это будет вот так:
Преимущество такого способа установки позволяют стереть грань между операционными системами и получить доступ ко всему инструментарию Linux ( bash , ssh , git , apt и так далее) из стандартной командной строки Windows не теряя привычное окружение и оставаясь на одном файловом уровне.
Ссылки на официальную документацию:
VirtualBox
Если вы работаете на Windows версии ниже 10 или хотите получить изолированную операционную систему Linux, да ещё и с графическим окружением, то можно воспользоваться сторонним бесплатным программным продуктом под названием VirtualBox.
Инсталлятор Oracle VM VirtualBox для Windows Hosts
Ссылка на скачивание: Download Oracle VM VirtualBox
Образ операционной системы Ubuntu Linux в формате ISO
Ссылка на скачивание: Download Ubuntu Desktop
Для начала необходимо установить и запустить приложение VirtualBox.
Нажимаем кнопку «Создать», выбираем из списка тип операционной системы «Linux», если нет своих предпочтений по дистрибутиву, то выбираем версию «Ubuntu» 32 или 64 битной архитектуры, а название можно ввести любое.
Указываем объём оперативной памяти выделенной под виртуальную систему. Рекомендованный объём составляет 1024 MB.
Указываем объём дискового пространства выделенного под виртуальную систему. Рекомендованный объём составляет 10 GB.
Тип виртуального жёсткого диска можно оставить как есть — VDI (VitrualBox Disk Image).
Формат хранения данных выберите исходя из личных предпочтений. Динамический виртуальный жёсткий диск растёт по мере заполнения, а фиксированный создаётся сразу того размера, который был указан на предыдущем шаге.
Имя и размер файла можно оставить без изменений и сразу нажать на кнопку «Создать».
По завершению у вас будет создана виртуальная машина, но она пока без операционной системы. Для того чтобы её установить, нужно скачать Ubuntu Linux (32-bit или 64-bit, в зависимости от того, что было выбрано на шаге, где мы указывали тип ОС).
Нажатие на кнопку «Запустить» должно привести к появлению диалогового окна с предложением указать путь до скаченного ISO образа. Сделайте этого и нажмите кнопку «Продолжить»
Виртуальная машина автоматически будет выполнять часть процессов, но в некоторых операциях всё же потребуется участие пользователя.
Выберите языковую поддержку в списке слева и нажмите «Установить Ubuntu».
Можно загрузить обновления сразу на этапе установки.
Без особых опасений выбираем пункт «Стереть диск и установить Ubuntu» и двигаемся дальше.
Если вы выбрали русский язык на первом этапе установки, то вам предложат русскую раскладку клавиатуры в качестве дополнительной.
Заполните поля и выберите режим входа в систему.
Далее начнётся процедура разметки диска, переноса файлов, установка обновлений и другие процессы, которые не потребуют прямого участия пользователя.
По завершению виртуальный компьютер перезагрузится и вы попадёте в уже установленную среду Ubuntu Linux.
Но это ещё не всё. Весьма желательно установить так называемые «Дополнения гостевой ОС». Они содержат драйверы и прочие системные файлы, необходимые для наилучшей производительности и обеспечения дополнительных функциональных возможностей между виртуальной и гостевой операционными системами.
Выберите пункт меню «Устройства» программы VitrualBox, подпункт «Подключить образ диска Дополнений гостевой ОС…» и дождитесь предложение запустить приложение для автоматического запуска с виртуального привода.
Виртуальная ОС Ubuntu Linux установлена и готова к работе.
Ссылка на официальную документацию: Oracle VM VirtualBox User Manual
Copy paste not working on Virtual box 6.1 running Ubuntu 18.04 on Windows 10 Machine
I am Using Virtual Box 6.1 and Ubuntu 18.04.
Here are my steps:
- start the Ubuntu on a Virtual Box
- in the VirtualBox guest window menubar, select Devices -> Install Guest Additions
- if prompted to automatically attempt to run software from the CD, just hit cancel
- sudo apt-get install build-essential linux-headers-generic
- open a command-prompt window ( Applications -> Accessories -> Terminal )
I have already enabled the copy/paste to bi-directional in the settings but still it is not working. I have tried rebooting the machine too. What am I missing here, please help?
Also, I have tried —
6 Answers 6
There is actually a problem with 6.1.4 VBOX version. I posted the question in Oracle vbox forum and it worked after downgrading it to 6.1.2 VBox version. Here is the link —
I had the same issue, there’s something broken with the guest addictions. In the guest VM’s that I’ve upgraded the guest addictions the clipboard stopped working but in the VM’s that I didn’t upgrade it still works as expected.
There are two approaches to the issue:
- Downgrade to 6.1.2 as referred above by @kurramkurram D
- Install the test guest addiction pack 6.1.97-136310
The test guest addiction pack that solved the issue without having to downgrade the virtualbox version is located here
To accomplish the instalation all you need to do is mount the ISO as a CDROM in the guest OS and execute the install. After reboot the clipboard should work as expected.
Permission Error copying files into Ubuntu on Windows with Windows copy/paste
I’m currently using Ubuntu on Windows from the Microsoft Store.
To try some of my Python scripts, I copied and pasted them to the documents folder I can access with Ubuntu session :
But when I lauch the scripts, it returns «PermissionError: [Errno 13] Permission denied: ‘[folderName]» . Is there a way to copy/paste files and folders from Windows session to Ubuntu folders without having to run chmod on all files ?
Thanks for your time
4 Answers 4
You should not be manually copying data into the WSL installation from Windows — it will give you this permissions error when you do this. Rather, you should be copying from windows into WSL from within the WSL environment instead.
The Windows C drive is located at /mnt/c within WSL. If the scripts are located in C:\Users\username\My Documents\Python\ then you can do the following from within WSL to copy the scripts into the Ubuntu environment:
This will copy the data in and retain permissions so it works properly within the Windows subsystem for Linux. This also saves you from having to chmod typically.
I think this answer needs to be updated.
WSL wasn’t allowing you before but it’s now possible following this guide
You can simply move or copy/paste files inside one of these Linux directories, or through cmd or bash shell.
I wanted to move a file to the Ubuntu WSL working directory from the windows downloads folder using Ubuntu WSL command prompt as i had downloaded some files from an email but it denied access when i used the /mnt/c method. And the files get corrupted if you force copy them manually using the windows GUI. So what i did was that i installed firefox using my Ubuntu WSL command prompt. Opened the email using firefox (using the prompt ofcource) and downloaded the files which then went to a downloads folder in my Ubuntu WSL working directory. I got the files and the program to read the files was also installed using Ubuntu WSL so it worked for me. I am not sure whether the file reader if not installed using the Ubuntu WSL prompt will read the files for you because as far as i understand windows doesn’t like to keep links with the Ubuntu WSL extension it provides. However if it helps, just email the files to yourself and download them using firefox and you have them.
Ubuntu on windows paste
Switch language: EN | ES
The wonderful Ubuntu terminal is freely available for Windows 10.
As any Linux user knows, it’s the command line terminal where the magic happens. It’s perfect for file management, development, remote administration and a thousand other tasks.
The Ubuntu terminal for Windows has many of the same features you’ll find using the terminal on Ubuntu:
- Unrivalled breadth of packages, updates and security features
- Bash, Z-Shell, Korn and other shell environments without virtual machines or dual-booting
- Run native tools such as SSH, git, apt and dpkg directly from your Windows computer
- A huge community of friendly, approachable users
Originally authored by Graham Morrison.
2. Requirements
You will need a x86 PC running Windows 10.
Windows 10 needs to be updated to include the Windows 10 Fall Creators update, released October 2017. This update includes the Windows Subsystem for Linux which is needed to run the Ubuntu terminal.
3. Enable WSL
To enable WSL 1 on Windows 10 Fall Creators update and newer run the following in PowerShell as Administrator:
To enable WSL 2 on Windows 10 May 2020 update and newer run the following in PowerShell as Administrator:
and then restart Windows 10.
4. Install Ubuntu for Windows 10
Ubuntu can be installed from the Microsoft Store:
- Use the Start menu to launch the Microsoft Store application or click here.
- Search for Ubuntu and select the first result, ‘Ubuntu’, published by Canonical Group Limited.
- Click on the Install button.
Ubuntu will be downloaded and installed automatically. Progress will be reported within the Microsoft Store application.
5. Launch Ubuntu on Windows 10
Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.
First launch
When launched for the first time, Ubuntu will inform you that it’s ‘Installing’ and you’ll need to wait a few moments.
When complete, you’ll be asked for a username and password specific to your Ubuntu installation. These don’t need to be the same as your Windows 10 credentials. With this step complete, you’ll find yourself at the Ubuntu bash command line.
Congratulations! You have successfully installed and activated the Ubuntu terminal on Windows 10. You now have all the power of the command line at your fingertips.
6. Getting help
If you need some guidance getting started with the Ubuntu terminal, take a look at the community documentation, and if you get stuck, help is always at hand: