Linux touch on windows

Установка Ubuntu Touch¶

Установить Ubuntu Touch очень просто, у нас ушло много работы на то, чтобы сделать процесс установки удобным для всех пользователей. Программа UBports Installer — это прекрасный графический инструмент для установки Ubuntu Touch на поддерживаемое устройство напрямую из операционных систем Linux, Mac или Windows. Опытные пользователи могут установить систему вручную, подробные инструкции есть на странице устройств.

Если Вы устанавливаете Ubuntu Touch на устройство с ОС Android, то обязательно потеряете данные, которые в данный момент находятся на устройстве. Обязательно создайте резервную копию всех данных на внешнем источнике (карта памяти, настольный компьютер, ноутбук и т.д.).

Перейдите на страницу ` загрузки ` _ и скачайте подходящую версию инсталятора. Доступны следующие пакеты:

ОС Windows: ubports-installer- .exe

ОС macOS: ubports-installer- .dmg

Другие дистрибутивы Linux: «ubports-installer- .snap` или ubports-installer- .AppImage

Запустите программу-установщик и следуйте инструкциям на экране, которые будут сопровождать процесс установки.

If you’re an experienced android developer and want to help us bring Ubuntu Touch to more devices, visit the porting section .

Please do not start the installer with sudo . It is meant to be run as a normal user, not as root. Using the installer with sudo will mess up permissions in the installer’s cached files and lead to problems down the road. If the installer does not recognize your device, check the troubleshooting information below.

Траблшутинг¶

Если Вам нужна помощь, можно обратиться к официальным каналам UBports в Telegram или в matrix, а также задать вопрос на форуме `_ или на сайте askubuntu _. Если Вы считаете, что программа-установщик UBports работает некорректно, то можете ` создать тикет на баг-трекере _, чтобы мы узнали о проблеме.

Соединение потеряно во время установки¶

Попробуйте использовать другой кабель USB и другой порт USB на компьютере. Дешевые и старые кабели могут допускать обрывы связи во время процесса установки.

Программа-файервол Windows Defender блокирует работу программы-установщика¶

Мы сообщили Microsoft об этой ошибке, но они, похоже, думают, что`проблем нет `__. Чтобы запустить программу-установщик, нажмите клавишу «Подробнее», затем выберите «Все равно запустить».

Устройство не распознано¶

Виртуальная машина¶

Если программа-установщик запускается на виртуальной машине, убедитесь, что виртуальной машине разрешен доступ к USB-порту.

Драйвера ADB для Windows¶

Установите универсальный adb-драйвер и перезагрузите компьютер.

Fairphone 2 Vendor-ID (идентификатор телефона, определяемый производителем)¶

В терминале выполните команду echo 0x2ae5 >>

/.android/adb_usb.ini и перезапустите программу-установщик. Это никак не повлияет на snap-пакет.

Отсутствуют udev-rules¶

Если устройство не обнаружено в Linux и пакетах, отличных от snap, скорее всего не прописаны правила udev-rules.

Посмотрите, существует ли файл /etc/udev/rules.d/51-android.rules и содержит ли он приведенные ниже правила. Если нет, добавьте их в файл и запустите команду sudo service udev restart или sudo udevadm control —reload-rules && udevadm trigger .

Прочие вопросы¶

Если советы по устранению неполадок не помогают, можно попробовать запустить установку вручную. Инструкции есть на странице с описанием устройств _.

Установка на устройства со старыми версиями Android¶

Хотя процесс установки довольно простой, некоторые устаревшие модели Bq и Meizu требуют специальных действий. Эта часть руководства не относится к другим устройствам.

Информации об устройствах относительно немного. Многие производители мобильной электроники не хотят, чтобы пользователи устанавливали альтернативную операционную систему, и ситуацию никак не изменить. Приведенные ниже инструкции предназначены только для опытных пользователей. Хотя мы понимаем, что многие люди хотят использовать нашу ОС, перепрошивка устройства с помощью OEM-инструментов не должна осуществляться без определённых навыков и четкого понимания процесса.

Мобильные устройства Meizu в основном проектировались для ОС Flyme (операционная система с открытым исходным кодом, основанная на Android Open Source Project от Google). Если смартфон MX4 иногда успешно перепрошивается, то смартфон Pro5 построен на семействе микропроцессоров Exynos и имеет свои проблемы.

Читайте также:  Xerox phaser 3130 драйвер для windows x64

ВНИМАНИЕ! Все действия осуществляются Вами на свой страх и риск!

Отключите все ненужные и неиспользуемые устройства от персонального компьютера. Зарядите свое мобильное устройство от сети (не от ПК) как минимум до 40 процентов.

Скачайте Ubuntu Touch ROM для вашего мобильного устройства и распакуйте zip-архив:

The Best Linux Distros for a Touchscreen Monitor

The concept of using Linux on a touchscreen monitor or two-in-one computer has come a long way. Touchscreen support is now built in to the Linux kernel, so theoretically, any Linux distribution should run with a touchscreen. That said, not every distribution will be easy to use on a touchscreen, and this comes down to the desktop. This means choosing the best Linux distros for a touchscreen that use the optimal desktop out of the box.

For example, using a tiling window manager like Awesome or i3 isn’t going to do you much good on a touchscreen. Choose the right desktop (more precisely, desktop environment), and you’ll have a much better time using Linux with a touchscreen.

1. GNOME 3

As one of the most popular desktops available for Linux, it shouldn’t come as a surprise that GNOME 3 works well with a touchscreen. Since version 3.14, the desktop has supported touchscreen gestures, which lets you get even more done with your touchscreen monitor.

That’s not the only thing that makes GNOME 3 so touch-friendly. It has large icons that are easy to tap, and the way things are laid out works very well as a primarily touch-based interface. Not everything is perfect, but if you’re looking to use a familiar desktop with your touchscreen, this is a great option.

Some of the best Linux distros for a touchscreen that already use GNOME 3 without extra tweaks include:

  • Fedora (one of the best for GNOME 3)
  • Ubuntu
  • CentOS (slower on updates)
  • Manjaro (updates several weeks after new GNOME releases)

2. KDE Plasma

KDE Plasma is the latest version of the venerable KDE desktop. Like GNOME, the QT-powered KDE has been around for a very long time, so you’ll find users who are as loyal to this desktop as they are to anything else.

The most recent versions of KDE support Wayland, which makes using a touchscreen monitor much easier than using the aging X11 system. They work on Plasma Mobile, which is meant to run on touch-only devices. Touchscreen support in KDE Plasma has improved over a very short time.

If you prefer Linux distros for a touchscreen that have KDE Plasma built in, try:

3. Cinnamon

If you’re coming from Windows 10, you may find the Cinnamon desktop pleasing, as it’s a similar layout. It doesn’t look exactly the same, which you may consider a good thing, but most of the main elements are in roughly the same place.

Cinnamon has also dramatically improved its touchscreen support in recent releases. It may not be as error-free as GNOME, and it doesn’t work as smoothly as Windows, but it’s still a desktop worth trying out.

If you’d prefer a Linux distro with Cinnamon already setup, try:

  • Linux Mint Ulyssa (Cinnamon edition slated to be supported through at least 2025)
  • Fedora Cinnamon
  • Feren OS (infrequent updates)

4. Deepin DE

Another desktop powered by QT, the Deepin Desktop Environment, ships with the Deepin Linux distribution. People praise Deepin for its ease of use and its sleek, friendly look, and both of these factors stem from the desktop itself.

Since the release of Deepin 15.9, the desktop has included touchscreen gestures. These greatly improve the usability of the desktop, making it much easier to recommend for a touchscreen monitor. The easiest way to use this desktop is in the Deepin distribution, but it is also available for other distros like Arch.

5. Budgie

Budgie is another desktop environment developed for a specific Linux distro. In this case, it is the default desktop for the Solus Linux distribution. You won’t find any fancy touchscreen gestures available yet, but you do get basic scrolling and tap-to-click.

Читайте также:  Операционная система для пк windows 10 pro

Fortunately, if you want to use Budgie for its eye-catching look but also want gestures, there’s a way to do it. There’s a project by the name of Touchegg that can add Mac-style gestures to any desktop. Even better, we have a guide to installing and using Touchegg.

Conclusion

We’ve had a look at some of the best desktop environments you can choose for a touchscreen monitor, but that’s probably not all you keep in mind when choosing a distribution. There are a lot of other things to consider, like what you’re going to be using the distribution for.

Remember, you’re not limited to just the Linux distros for a touchscreen monitor that’s listed. You’re free to install the desktop environments on a variety of distros, as long as the distro supports it.

Don’t want to pick and choose your way through countless distros? Don’t worry. We have a list of the best Linux distros available that will help you find the right one for you.

Related:

Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.

Equivalent of Linux `touch` to create an empty file with PowerShell? [duplicate]

In PowerShell is there an equivalent of touch ?

For instance in Linux I can create a new empty file by invoking:

On Windows this is pretty awkward — usually I just open a new instance of notepad and save an empty file.

So is there a programmatic way in PowerShell to do this?

I am not looking to exactly match behaviour of touch, but just to find the simplest possible equivalent for creating empty files.

14 Answers 14

Using the append redirector «>>» resolves the issue where an existing file is deleted:

To create a blank file:

To update the timestamp of a file:

Here is a version that creates a new file if it does not exist or updates the timestamp if it does exist.

In PowerShell you can create a similar Touch function as such:

I prefer Format-Table for this task (mnemonic file touch):

To work with non-empty files you can use:

I chose this because it is a short command that does nothing in this context, a noop. It is also nice because if you forget the redirect:

instead of giving you an error, again it just does nothing. Some other aliases that will work are Format-Custom ( fc ) and Format-Wide ( fw ).

There are a bunch of worthy answers already, but I quite like the alias of New-Item which is just: ni

You can also forgo the file type declaration (which I assume is implicit when an extension is added), so to create a javascript file with the name of ‘x’ in my current directory I can simply write:

3 chars quicker than touch!

I put together various sources, and wound up with the following, which met my needs. I needed to set the write date of a DLL that was built on a machine in a different timezone:

Of course, you can also set it for multiple files:

It looks like a bunch of the answers here don’t account for file encoding.

I just ran into this problem, for various other reasons, but

both produce a UTF-16-LE file, while

produces a UTF-8 file.

For whatever reason fc > $file and fc >> $file , also seem to produce UTF-8 files.

gives you a UTF-8-BOM file, while

gives you a UTF-8 file. Other valid (but untested) encodings that Out-File supports are: [[-Encoding] ]. You can also pipe stuff to Out-File to give the file some text data to store, and also an -append flag. For example:

Читайте также:  Kernel auto boost invalid lock release windows 10 ryzen

this example does not update the timestamp for some reason, but this one does:

Although it does have the side effect of appending «foo» to the end of the file.

If you are unsure about what encoding you have, I’ve found VS-Code has a nifty feature where at the bottom right hand corner it says what the encoding is. I think Notepad++ also has a similar feature.

Create an empty file on the commandline in windows (like the linux touch command)

On a windows machine I get this error

‘touch’ is not recognized as an internal or external command, operable program or batch file.

I was following these instructions which seem to be linux specific, but on a standard windows commandline it does not work like this:

Is there a windows equivalent of the ‘touch’ command from the linux / mac os / unix world ? Do I need to create these files by hand (and modify them to change the timestamp) in order to implement this sort of command? I am working with node and that doesn’t seem very . node-ish.

20 Answers 20

An easy way to replace the touch command on a windows command line like cmd would be:

This will create 0 bytes in the your_file.txt file.

This would also be a good solution to use in windows batch files.

Another way of doing it is by using the echo command:

echo. — will create a file with one empty line in it.

If you need to preserve the content of the file use >> instead of >

You can also use call command.

Calls one batch program from another without stopping the parent batch program. The call command accepts labels as the target of the call.

Windows does not natively include a touch command.

You can use any of the available public versions or you can use your own version. Save this code as touch.cmd and place it somewhere in your path

It will iterate over it argument list, and for each element if it exists, update the file timestamp, else, create it.

You can use this command: ECHO >> filename.txt

it will create a file with the given extension in the current folder.

UPDATE:

for an empty file use: copy NUL filename.txt

The answer is wrong, it only works when the file does not exist. If the file exists, using the first does nothing, the second adds a line at the end of the file.

The correct answer is:

On windows Power Shell, you can use the following command:

Note: New-Item can be replaced with its alias ni

I’m surprised how many answers here are just wrong. Echoing nothing into a file will fill the file with something like ECHO is ON , and trying to echo $nul into a file will literally place $nul into the file. Additionally for PowerShell, echoing $null into a file won’t actually make a 0kb file, but something encoded as UCS-2 LE BOM , which can get messy if you need to make sure your files don’t have a byte-order mark.

After testing all the answers here and referencing some similar ones, I can guarantee these will work per console shell. Just change FileName.FileExtension to the full or relative-path of the file you want to touch ; thanks to Keith Russell for the COPY NUL FILE.EXT update:

CMD w/Timestamp Updates

copy NUL FileName.FileExtension

This will create a new file named whatever you placed instead of FileName.FileExtension with a size of 0 bytes. If the file already exists it will basically copy itself in-place to update the timestamp. I’d say this is more of a workaround than 1:1 functionality with touch but I don’t know of any built-in tools for CMD that can accomplish updating a file’s timestamp without changing any of its other content.

CMD w/out Timestamp Updates

if not exist FileName.FileExtension copy NUL FileName.FileExtension

Powershell w/Timestamp Updates

if (!(Test-Path FileName.FileExtension -PathType Leaf)) else

Yes, it will work in-console as a one-liner; no requirement to place it in a PowerShell script file.

Оцените статью