- Guide: Installing and Running a GNU/Linux Environment on Any Android Device
- Setting Up GNU/Linux on Android
- Step-by-Step Guide
- Installing Linux Applications
- Change from android to linux
- AnLinux: простой способ установить Linux-окружение на Android-телефон без рута
- Что такое AnLinux?
- С чего начать?
- Что же, приступим
- А что с графической оболочкой?
Guide: Installing and Running a GNU/Linux Environment on Any Android Device
As many of you may well be aware, the Android operating system is powered by the Linux kernel underneath. Despite the fact that both Android and GNU/Linux are powered by the same kernel, the two operating systems are vastly different and run completely different types of programs.
Sometimes, however, the applications available on Android can feel a bit limited or underwhelming, especially when compared to their desktop counterparts. Fortunately, you can get a GNU/Linux environment up and running on any Android device, rooted or non-rooted. (The following instructions assume a non-rooted device.)
For those power users on Android tablets, or other Android devices that have large screens (or can plug into a bigger screen), the ability to run desktop Linux software can go a long way towards increasing the potential that an Android device has for productivity.
Setting Up GNU/Linux on Android
To get a GNU/Linux environment set up on your Android device, you only need to install two applications from the Google Play store: GNURoot Debian and XServer XSDL. After you do that, you will only need to run a small handful of Linux commands to complete the installation.
GNURoot Debian provides a Debian Linux environment that runs within the confines of the Android application sandbox. It accomplishes this by leveraging a piece of software called proot, a userspace re-implementation of Linux’s chroot functionality, which is used to run a guest Linux environment inside of a host environment. Chroot normally requires root access to function, but by using proot you can achieve similar functionality without needing root privileges.
GNURoot comes with a built-in terminal emulator for accessing its Debian Linux environment. This is sufficient for running command-line software, however, running graphical software requires an X server to be available as well. The X Window System was designed to have separate client and server components in order to provide more flexibility (a faster, more powerful UNIX mainframe could act as the client to X server instances running on much less powerful and less sophisticated terminals).
In this case, we will use a separate application, XServer XSDL, that GNURoot applications will connect to as clients. XServer XSDL is a complete X server implementation for Android powered by SDL that has many configurable options such as display resolution, font size, different types of mouse pointer behavior, and more.
Step-by-Step Guide
1. Install GNURoot Debian and XServer XSDL from the Play Store.
2. Run GNURoot Debian. The Debian Linux environment will unpack and initialize itself, which will take a few minutes. Eventually, you will be presented with a “root” shell. Don’t get misled by this – this is actually a fake root account that is still running within the confines of the Android application sandbox.
3. Run apt-get update and apt-get upgrade to ensure you have the most up-to-date packages available on your system. Apt-get is Debian’s package management system that you will use to install software into your Debian Linux environment.
4. Once you are up-to-date, it’s time to install a graphical environment. I recommend installing LXDE as it is simple and light-weight. (Remember, you’re running Debian with all the overhead of the Android operating system in the background, so it’s best to conserve as many resources as you can.) You can either do apt-get install lxde to install the desktop environment along with a full set of tools, or apt-get install lxde-core to only install the desktop environment itself.
5. Now that we have LXDE installed, let’s install a few more things to complete our Linux setup.
• XTerm – this provides access to the terminal while in a graphical environment
• Synaptic Package Manager – a graphical front-end to apt-get
• Pulseaudio – provides drivers for playing back audio
Run apt-get install xterm synaptic pulseaudio to install these utilities.
6. Finally, let’s get the graphical environment up and running. Start XServer XSDL and have it download the additional fonts. Eventually you will get to a blue screen with some white text – this means that the X server is running and waiting for a client to connect. Switch back to GNURoot and run the following two commands:
Then, switch to XServer XSDL and watch the LXDE desktop come up onto your screen.
I recommend putting the above two commands into a shell script so that you can easily restart LXDE if you close the session or if you need to restart your device.
Installing Linux Applications
Congrats! You’ve successfully gotten Debian Linux up and running on your Android device, but what good is running Linux without apps? Fortunately, you’ve got a massive repository of Linux applications at your fingertips just waiting to be downloaded. We’ll use the Synaptic Package Manager, which we installed earlier, to access this repository.
Click the “start” button at the lower-left hand corner, click Run, and then type synaptic . The Synaptic Package Manager will load. From here, simply press the Search button at the top and then type the name of the application you’d like to install. Once you’ve found an application, right click it and select “Mark for Installation”. When you are finished marking packages, click the Apply button at the top to start the installation. Uninstalling packages follows the same procedure, except by right-clicking and selecting “Mark for Removal” instead.
Of course, since this isn’t a real Linux installation but rather a Linux environment running on top of, and within the constraints of, Android, there are a couple of limitations to be aware of. Some applications will refuse to run or will crash, usually due to the fact that some resources that are usually exposed on GNU/Linux systems are kept hidden by Android. Also, if a regular Android app can’t do something, then usually a Linux application running within Android can’t as well, so you won’t be able to perform tasks such as partitioning hard drives. Lastly, games requiring hardware acceleration will not work. Most standard everyday apps, however, will run just fine. Some examples include Firefox, LibreOffice, GIMP, Eclipse, and simple games like PySol.
I hope that you find this tutorial useful. While I personally performed these steps on my Google Pixel C, you can do this on most Android devices. Preferably on a tablet device with access to keyboard and mouse peripherals, of course. If you already run a GNU/Linux distribution on your Android device, let us know what you are using it for below!
Источник
Change from android to linux
Краткое описание:
Установка Linux на Android в Termux без рут-прав
Andronix lets you install a Linux system on your Android Device without root. We found out that using Linux on Android is quite useful and lets you do many heavy tasks on your Android device.
This app lets you install various popular Linux distributions on your Android device by using Termux and PRoot functionality on the Android system. The application also provides you a graphics layer or Desktop environment (Xfce, MATE, LXDE, LXQT and KDE) on the top of the Linux shell which makes the user experience much better than working on a Linux command line.
* Manjaro is now available with xfce, lxqt, lxde and mate.
* Ubuntu KDE is now available which is great success.
* KDE Performance optimization — Better performance.
* Added multiple Window manager — Better look in KDE.
* Prinstalled softwares and themes — Makes a better aesthetic.
* AndroNix Premium — We have released AndroNix Premium with tons of features.
* Dark Mode — Use AndroNix at night comfortably.
* AndroNix Commands — A special addition to the family of AndroNix. It’s all you need to manage your commands throughout your life. Just copy and paste!
* AndroNix Web App — We have also released our web app to compliment AndroNix commands on Android, so you can now access Commands on any internet connected device.
* AndroNix Feed — We saw that since the last release you guys were really happy about the blogs we posted. So now we have a dedicated blog feed to make a better use of Linux and the power it offers.
* Offline Downloads — Internet can be unpredictable sometimes, but don’t worry we’re introducing offline support of Linux distros, though you’ll be still needing internet to download some files depending upon your device at the time of installing.
* Robust Documentation — We’ve been working on writing some documentations for weeks now. This will enable you to help yourself without waiting for us to reply.
* Priority Support — AndroNix Premium bring priority support with it at no extra cost. IF you’re an AndroNix Premium member just enjoy the blazing fast support, on the platform you like!
* Communities budding — We now support official AndroNix communities on Telegram and WhatsApp. We will soon expand to other platforms as well.
* UI overhaul — We’ve redisgned almost every element the our app and worked on user experience more than ever
* Automation Added — If you choose AndroNix Premium, we’ll handle everything for you. Just login and forget the rest.
* Profile Tab Added — Profile let’s you see your current status (Premium or not). If you’re a premium member, profile section has many things for you.
* Termux is now available offline — We now offer an offline copy of Termux within
AndroNix.
If you are new to Linux, we provide you easy and hassle-free instructions which makes your first impression of Linux a lot better. In case you still face some issues you can easily contact us on various platforms mentioned in the app. We ensure you that we will contact you as soon as possible.
— No root permissions required.
— Distros we support:
* Manjaro
* Ubuntu
* Kali Linux
* Debian
* Parrot OS
* Fedora
* Arch Linux
— Desktop environments we support:
* KDE
* LXDE
* LXQT
* MATE
* XFCE
— One click install/uninstall feature.
— Features multiboot linux system.
— Termux in required.
— Android version should be at least 5.1
— Device architecture supported: ARMv7, ARM64, x64.
Требуется Android: 5.1 и выше
Русский интерфейс: Нет
Источник
AnLinux: простой способ установить Linux-окружение на Android-телефон без рута
Любой телефон или планшет, работающий на Android, — это устройство, которое управляется ОС Linux. Да, очень модифицированной ОС, но все же основа Android — ядро Linux. Но, к сожалению, для большинства телефонов опция «снести Android и поставить дистрибутив по своему вкусу» недоступна.
Поэтому, если хочется Linux на телефоне, приходится покупать специализированные гаджеты вроде PinePhone, о котором мы уже писали в одной из статей. Но есть еще один способ получить Linux-окружение практически на любом смартфоне, причем без root-доступа. Поможет в этом инсталлятор, который называется AnLinux.
Что такое AnLinux?
Это специализированное ПО, которое дает возможность использовать Linux на телефоне при помощи монтирования образа, содержащего root-файловую систему любого из дистрибутивов, включая Ubuntu, Kali, Fedora, CentOS, OpenSuse, Arch, Alpine и многих других. Инсталлятор использует PRoot для эмуляции root-доступа.
PRoot перехватывает все выполняемые пользователем вызовы, которые требуют в обычной ситуации root-доступа, и обеспечивает их работоспособность в обычных условиях. В PRoot используется системный вызов ptrace для отладки ПО, который помогает достичь цели. С PRoot все это можно сделать как с chroot, но без root-прав. Кроме того, PRoot предоставляет фейковый доступ пользователю для пседвофайловой системы.
AnLinux — небольшая программа. Но этого достаточно, ведь единственное ее предназначение — установка образов систем и запуск скриптов, поднимающих пользовательское окружение. Когда все сделано, пользователь получает вместо смартфона Linux-ПК, причем Android продолжает работать на фоне. Подключаемся к устройству при помощи VNC-вьювера или терминала, и можно работать.
Конечно, это не идеальный вариант «завести» Linux на смартфоне, но он вполне рабочий.
С чего начать?
Основное — Android-смартфон с версией ОС не ниже Lollipop. Кроме того, пойдет и 32-битное или 64-битное ARM или x86-устройство. Кроме того, потребуется солидный объем свободного файлового пространства. Для этого можно использовать карту памяти или просто устройство с большим объемом внутренней памяти.
Кроме того, потребуется:
- AnLinux (вот ссылка на Google Play).
- Termux (снова понадобится Google Play).
- VNC Client (VNC Viewer — хороший вариант).
- Bluetooth-клавиатура (опционально).
- Bluetooth-мышь (опционально).
- HDMI кабель для мобильного телефона (опционально).
Termux и VNC нужны для получения доступа к своему «компьютеру на Linux». Последние три элемента требуются лишь для того, чтобы обеспечить комфортную работу с телефоном и установщиком. HDMI-кабель нужен только в том случае, если пользователю удобнее работать с большим экраном, а не вглядываться в дисплей телефона.
Что же, приступим
Как только установлен Termux, получаем полноценную консоль. Да, рута нет (если телефон не рутован), но ничего страшного. Следующий шаг — установка образа для дистрибутива Linux.
Теперь нужно открыть AnLinux и затем — выбрать Dashboard из меню. Всего есть три кнопки, но выбрать можно лишь одну, первую. После этого появляется меню выбора дистрибутива. Можно выбрать даже не один, а несколько, но в этом случае понадобится большой объем свободного файлового пространства.
После выбора дистрибутива активируются две другие кнопки. Вторая позволяет загрузить в буфер обмена команды, необходимые для загрузки и установки Linux. Обычно это pkg, wget команды и скрипт для их выполнения.
Третья кнопка запускает Termux, так что команды можно вставлять в консоль. Как только все сделано, запускается скрипт, позволяющий загрузить окружение дистрибутива. Для вызова дистрибутива нужно каждый раз запускать скрипт, но установку проводим только один раз.
А что с графической оболочкой?
Если она нужна, то следует лишь выбрать меню для десктопного окружения и использовать больше кнопок — появится не три, а больше. Кроме самого дистрибутива, нужно выбрать еще и оболочку, например, Xfce4, Mate, LXQt или LXDE. В целом, ничего сложного.
Потом кроме скрипта, который запускает дистрибутив, потребуется еще один — он активирует сервер VNC. В целом, весь процесс простой и понятный, он вряд ли способен вызвать затруднения.
После запуска сервера VNC подключаемся со стороны клиента, воспользовавшись вьювером. Требуется знать порт и localhost. Все это сообщает скрипт. Если все сделано правильно, то пользователь получает доступ к своей виртуальной Linux-системе. Производительность современных телефонов на высоте, так что особых проблем не будет. Конечно, вряд ли смартфон сможет полностью заменить десктоп, но, в целом, все это работает.
Этот способ может пригодиться, если вдруг нужно срочно подключиться к серверу, а вы в машине, без ноутбука (конечно, в этом случае все описанные выше операции с AnLinux уже должны быть выполнены). Виртуальная Linux-машина позволяет подключиться к рабочему или домашнему серверу. А если в автомобиле по какой-то причине оказался дисплей и беспроводная клавиатура, то за считанные секунды в салоне можно организовать рабочий кабинет.
Источник