Кнопочный телефон на windows

Rick Akura

Trying to run a shell script (.sh) file on your Windows device? Find out how with this tutorial, complete with the steps you need to make it happen.

What if you want to run a .sh or shell script file in Windows 11/10? If you’ve worked with Unix or Linux operating systems, you’re likely familiar with shell scripts, which are commonly used to automate tasks and simplify complex workflows. However, running these files on a Windows computer is a bit tricky, as it’s an uncommon file type and many users don’t know how to execute them.

Fortunately, there are a few different ways to execute a .sh or shell script file in Windows 11/10. In this article, we’ll explore the various methods to execute .sh or shell script files on a Windows machine.

Table of Contents

  1. What Are Shell Script (.sh) Files?
  2. How to Run a Shell Script (.sh) File in Windows 11/10
  3. Execute the Shell Script File With Windows Subsystem for Linux (WSL)
  4. Using Cygwin
  5. Frequently Asked Questions

What Are Shell Script (.sh) Files?

The .sh or Shell Scripts file is a type of script file that runs in the Linux operating system. It’s analogous to Windows batch files, which are used to run tasks on a computer. Running .sh files in Windows can be done with the help of several programs like Cygwin and BASH for Windows.

How to Run a Shell Script (.sh) File in Windows 11/10

To run a shell script file (.sh) in Windows, you should first make sure that the program you want to execute is available on your machine and that the path of the executable has been added to environment variables. The best way to do this is by using software like Cygwin which provides a UNIX-like interface in Windows, allowing access to various GNU/Linux utilities.

In case you don’t want to install any additional software there are other methods such as installing WSL (Windows Subsystem for Linux) which allows users to install Bash or Ubuntu terminal directly from the Microsoft Store, just like any other app that can be found on it but with restricted access as compared with applications running as Administrator privileges because of security purposes.

1. Execute the Shell Script File With Windows Subsystem for Linux (WSL)

wsl

The Windows Subsystem for Linux is a tool that allows software developers to use a Linux operating system on their Windows computers. This means they can run Linux software, like command-line tools and applications, directly on their Windows computer without needing to use a virtual machine or switch between different operating systems.

You can use the Windows Subsystem for Linux (WSL) to run shell script files on Windows because WSL allows you to run a Linux environment on your Windows machine. This environment includes most command-line tools and applications that are typically used on Linux, including the ability to run shell scripts.

  1. Navigate to the Settings app from your Start menu, or by using the Windows + I keyboard shortcut.
  2. Select «Privacy & security,» and then choose «For developers

    for developers

  3. Make sure that the «Developer Mode» option is enabled. You can do this by ensuring that the toggle is turned on. Click “Yes” if prompted.

    enable developer mode

  4. Open the Windows Search interface from your taskbar, or by pressing the Windows + S keyboard shortcut. Here, search for «Turn Windows features on or off» and open the applet from the search results.

    turn windows featuers on or off

  5. Scroll down until you see «Windows Subsystem for Linux,» and then check the box next to it to install it. Click OK and reboot the system. BASH should now be available in both the Command Prompt and PowerShell.

    enable wsl

  6. Press the Windows + R keys on your keyboard, and type in «cmd» without the quotes. Click the OK button to launch the Command Prompt.

  7. Find the name of the Shell Script you’re trying to run, and copy it. In the Command Prompt, type `bash` followed by the .sh file name (such as `bash myscript.sh`) and then press the Enter key.

    run bash command

  8. The script will execute and an output will appear, depending on the file.

Using WSL is an easy and straightforward way to run shell scripts in Windows 11/10. When you run a shell script file on WSL, it is interpreted by the Linux environment running on your Windows machine, which makes it possible to run shell scripts without needing a separate Linux installation.

2. Using Cygwin

cygwin

Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. It provides a way to run many Unix or Linux tools and utilities on a Windows machine. Here’s how to use Cygwin to run a .sh or shell script file:

  1. First, you need to download and install Cygwin on your Windows machine. You can download it from the official Cygwin website.
  2. Once Cygwin is installed, open it from the Start menu or by searching for «Cygwin» in the Windows search bar.
  3. In the Cygwin terminal, navigate to the directory where your script file is located. You can use the `cd` command to change directories. For example, if your script file is located in the “Documents” folder, you can navigate to it by typing `cd Documents` and pressing Enter.
  4. Next, you need to make the script file executable. To do this, use the `chmod` command followed by the `+x` option and the name of your script file. For example, if your script file is named `myscript.sh`, you would type `chmod +x myscript.sh` and press Enter.
  5. Finally, you can execute the script by typing `./.sh` and pressing Enter. For example, if your script file is named `myscript.sh`, you would type `./myscript.sh` and press Enter.

Cygwin provides a way to run Unix or Linux tools and utilities on a Windows machine, which can be useful if you’re familiar with Unix or Linux commands and want to use them on your Windows machine.

Frequently Asked Questions

Can I run a shell script on Windows without using any third-party tools?

Unfortunately, there’s no built-in way to run shell scripts on a Windows machine. You need to use third-party tools like Git Bash, WSL, Cygwin, or MinGW.

What if my script has dependencies on Unix-specific tools or utilities?

If your script has dependencies on Unix-specific tools or utilities, you may need to install those tools or utilities on your Windows machine. Alternatively, you can use a tool like Cygwin or WSL, which provides a Unix-like environment on Windows and includes many Unix-specific tools and utilities.

Can I use PowerShell to run shell scripts on Windows?

PowerShell is a powerful command-line shell and scripting language for Windows, but it’s not compatible with shell scripts written for Unix or Linux systems. You need to use one of the methods mentioned in this article to run shell scripts on a Windows machine.

What’s the difference between a .sh and .bash file extension?

Both .sh and .bash file extensions are used for shell scripts, but .bash is typically used for scripts that are specific to the Bash shell, while .sh can be used for scripts that are compatible with other shell programs as well.

Is it safe to run shell scripts on a Windows machine?

Running shell scripts on a Windows machine can be safe as long as you trust the source of the script and know what the script does. However, it’s always a good practice to review the script before running it and to run it in a controlled environment to avoid any unintended consequences.

One More Thing

We’re glad you’ve read this article. :) Thank you for reading.

If you have a second, please share this article on your socials; someone else may benefit too. 

Subscribe to our newsletter and be the first to read our future articles, reviews, and blog post right from your inbox. We also offer deals, promotions, and updates on our products and share them via email. You won’t miss one.

Related Articles 

» How to Run Windows Apps on Mac Without Running Windows
» How to Open .ASPX Files on Windows 11/10
» How to Open RAR Files in Windows 11/10

Bash shell script files are written in bash scripting language for Linux. It contains commands that you can normally run on the command line. These files can be called in Terminal to execute and can be opened by double-clicking. However, Windows does not know what an SH file is and how to execute it. If you are looking for a way to execute SH file in Windows then this article will provide you with all possible methods.

Execute SH files on Windows

What are the SH Files?

SH files (also known as script files) are the scripts that the Bash application programs and use. Bash language is used to write the instructions in these files. Program developers mostly use these files. Since they contain the commands to execute programs, they are indeed important. However, these files are for Linux, so executing them on Windows will require some software or environment that we will provide in methods of this article.

For further information about SH files, you can check our article here. Moving on towards methods for executing SH files on Windows.

Method 1: Using Cygwin to Execute SH Files

Cygwin is an open source command line interface environment similar to Unix. It allows Unix or Linux applications to be compiled and run on a Windows operating system from within a Linux-like interface. By using Cygwin, we can easily execute SH files without any problems.

  1. Go to the Official Cygwin site to download the 32bit or 64bit setup file: Cygwin

    Download site for Cygwin
  2. Open the downloaded setup file and follow the process of downloading and installing Cygwin. There are different options in the installation process so choose the ones you prefer.
  3. After installation, open Cygwin64 Terminal by double-clicking the shortcut on the desktop.
  4. Now use the following command to change directory to where the file exists:
    cd C:Users/Username/Desktop

    This will change the directory to the desktop. Now type the following command to execute SH File:

    sh appuals.sh

    Executing script file through Cygwin

Method 2: Using the Windows Subsystem for Linux Feature in Windows 10

The Windows Subsystem for Linux (aka WSL) is a feature that allows users to run Linux command lines on a computer with a Windows 10 operating system installed. This feature was first added to Windows 10 in 2016. Just like Linux has Wine software for running Windows software, now Windows has WSL for running Linux software. However, enabling and working through this feature will require many steps, which is why we divided this method into three major steps and they are listed as follow:

Step 1: Enabling the Windows Subsystem for Linux

  1. Hold Windows Key and Press R to open Run, then type appwiz.cpl and Enter.

    Opening Programs and Features
  2. Click on the Turn Windows Features on or off on the left side.

    Opening Turn Windows features on or off option
  3. Scroll down to the bottom and tick Windows Subsystem for Linux and click Ok to install.

    Enabling Windows Subsystem for Linux
  4. Once this is done, move to the next step.

Step 2: Installing a Linux Distro for the Windows

There are three different ways to install a distro for Windows. However, sometimes one of the methods will not work for a specific user, so we are going to provide all three methods below:

  1. Hold Windows key and press R to open Run, type ‘ms-windows-store:‘ without the quotation marks and Enter.
    Opening the Windows Store
  2. Search for Ubuntu. Click on the one that is shown below and download it:

    Downloading Ubuntu from Windows Store
  3. The second method is to use the following Power shell command to download Linux distro:
    Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing

    Downloading distro through Power Shell
  4. The third method to download the distro is using the following curl command:
    curl.exe -L -o ubuntu-1604.appx https://aka.ms/wsl-ubuntu-1604

    Downloading distro through curl command

    Note: If your Windows 10 build number is less than 1706 then you need to download curl manually and change directory to that location where curl.exe is located. However, if your windows 10 build number is 1706 or later then curl is included by default and you need to run cmd as an administrator.

  5. Once you download a distro, it will start the installation automatically and you need to just agree and provide the new username and password as shown below:

    Installing and setting up ubuntu

Step 3: Initializing a Newly Installed Distro and Executing SH File

  1. Most distros that you will install comes with empty/minimal package catalog. So you need to update and upgrade the packages by using the following command:
    sudo apt update && sudo apt upgrade

    Updating and Upgrading packages
  2. Once you are done with the distro, now you can change directory to the SH file location by using the following commands:
    cd /mnt

    This will mount your Windows drives. Now you can go to the location you want to:

    cd c/Users/Username/Desktop/

    Note: Since the sample file was on a desktop so we changed the directory to desktop.

  3. Type the following command to execute the SH file:
    sh appuals.sh

    Changing directory and executing the SH file

Method 3: Using Git Command Line for Executing SH Files

Git is a free and open source distributed version control system tool available for all operating systems. By default, Git is installed on Linux and macOS computers as a command line option. However, you can also download it from the official site for all operating systems.

  1. Go to the following link to download Git for your Operating System: Git

    Downloading Git for Windows
  2. Open the downloaded setup file to install Git. Go through the installation process and do check the options which you want and which you don’t.
  3. Hold Windows key and Press S to open search function, type Git Bash and Enter.
    Opening Git Bash
  4. Change directory to where your file is located by the following command:
    cd desktop

    Note: Desktop can be the name of the folder where your file is located.

  5. Now type the SH executing command:
    sh appuals.sh

    Executing SH file in Git Bash

Method 4: Translate Script File into Batch File

This method is not recommended for average users, but for the users who know script and bat files commands very well. You can just change the format and extension of SH file. It does require the skill of translating the script file into a batch file, so you should avoid using this method unless you know what format both these files use. We are going to show you the simple steps required for the sample code changes.

  1. Right-click on your SH file and choose Open with > Notepad.

    Opening SH file in Notepad
  2. Remove the shebang line from the code as shown below:

    Removing the shebang line

    Note: The comments will have a different syntax “::” than the one in this sample.

  3. Click on the File and choose Save in the list to save the changes.

    Saving the changes
  4. Left-click on the SH file and press F2 key to rename the file. You can also right-click on a file and choose rename.

    Changing the extension of the file

    Change the extension from .sh to .bat and click Yes for the changes.

  5. Hold Windows key and Press S to open search function, then type cmd and Enter.
  6. Change the directory to the path where the file is located by using the cd command:
    cd desktop

    Note: Desktop can be the folder name that you are trying to access.

  7. Now simply type the name of the file with extension:
    appuals.bat

    Opening batch file in cmd

    However, you will notice that the syntax that works in script files are not working in a batch file. As you can see, the comment is being ignored and the text will be printed twice without echo ‘on/off’.

Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

  • To run shell scripts on Windows, you must enable WSL and Virtual Machine Platform, install a WSL distro, and use “Bash Script.sh” to execute it.
  • Alternatively, use third-party tools like Cygwin, Cmder to run Linux commands on top of Windows OS.

If you have worked with Linux distributions and repositories, you would know what shell scripts are. To run shell scripts on top of a Windows computer can be challenging, as the process is not quite straightforward.

Shell scripts are a piece of code written in plain text but have the “.SH” file extension. These are usually used to automate tasks and execute Linux or Unix packages. These are written in Bash and start with “#! /bin/sh“.

You do not need to install a Linux or Unix distribution alongside your Windows operating system to run a shell script. In this article, we’ll show you how to run a shell script on a Windows PC.

Table of Contents

What are Shell (.SH) Files

The Linux/Unix operating system uses shell or .SH script files to perform certain tasks. In comparison, it can be substituted by Windows batch files for the Windows operating systems, which are used to execute commands on a computer.

The Batch language is a simple and interpreted programming language, unlike C++ or C#. However, you do not have to translate a shell script file to batch to perform similar tasks on a Windows computer, as you do on a Linux PC.

There are different methods to run the same .SH file on a Windows computer as on a Linux system. Let us show you how to run a shell file on a Windows PC.

Run Shell Script (.SH) File on Windows

There are both native and third-party methods to run shell files on a Windows computer. You can use Cygwin, or a third-party tool of your choice, to run a shell script on Windows OS. Alternatively, you can install the Windows Subsystem for Linux feature on Windows and then execute the shell script file through it.

Below you’ll find the methods to run the file using both methods.

Run Shell Script File using Windows Subsystem for Linux (WSL)

This section has been divided into 3 steps to make the process easier to understand. You must do the following 3 things to run a shell script file in the given order:

  1. Install WSL
  2. Install a Linux distro
  3. Run the shell script file

Note: If you are performing these steps on a Virtual Machine, then you will need to enable Nested Virtualization.

Install WSL

Use the following steps to install WSL on your computer:

  1. Press the Windows Key + R shortcut keys to open the Run Command box.

  2. Type in “optionalfeatures” and press Enter.

    Open the Optional Features applet
  3. Select “Windows Subsystem for Linux” and “Virtual Machine Platform,” and then click Ok.

    Enable WSL and Virtual Machine Platform

    Enable WSL and Virtual Machine Platform

    The wizard will now install WSL.

  4. When the installation is completed, click “Restart now.”

    Restart computer

    Restart computer

Once the computer restarts, it is time to install a Linux distro.

Install a Linux Distribution

Use the following steps to install a Linux distribution:

  1. When it restarts, press Windows Key + R again to open Run.

  2. Type in “cmd” and press CTRL + Shift + Enter to run Command Prompt as administrator.

  3. Run the following command to obtain a list of available Linux distros:

    wsl --list --online
    Get list of all available Linux distros in Command Prompt

    Get list of all available Linux distros in Command Prompt

    Note down the name of the distro you want to install.

  4. Use the following command to install the preferred distro while substituting its name:

    wsl --install -d [DistributionName]
    Install a Linux distro in WSL

    Install a Linux distro in WSL

    The distro will now begin to download and install.

  5. Set up a username and password.

    Set up username and password

    Set up username and password
  6. Restart the computer.

Now, the next step is to simply run the shell script file.

Run the Shell Script File

Follow the simple steps below to run the shell script file on a Windows PC:

  1. Press the Windows Key + R again to open Run.

  2. Type in “cmd” and press CTRL + Shift + Enter to run Command Prompt as administrator.

  3. Use the CD cmdlet to change the directory to the location of the shell script file.

    CD [PathToShellScriptFile]
    Change directory to the shell script file location

    Change directory to the shell script file location
  4. Now, use the following command to run the shell script file while substituting [ShellFileName] with the complete and correct name of the shell file:

    Bash [ShellFileName].sh
    Run the shell script file using Windows Subsystem for Linux

    Run the shell script file using Windows Subsystem for Linux

This is how you run a shell script (.SH) file on a Windows computer using WSL.

If this seems like a lengthy process for you, then you can also use the alternative method given below.

Run Shell Script File using Third-Party Tools

You can also run a shell script file on a Windows computer using a third-party tool. In the steps below, we have used Cygwin.

Follow these steps to run a .SH file on a Windows PC:

  1. First, download and install Cygwin from their official website.

  2. Once installed, run the Cygwin app.

  3. In the Cygwin terminal, use the CD command to change the directory to the shell script file location.

    Note: In Cygwin, the syntax to change the directory is different from Command Prompt or PowerShell. Use the following command syntax and example in the image to change your directory in Cygwin.

    CD /cygdrive/[driveLetter]/[Subfolder1]/[Subfolder2]
    Change directory to the shell script file location in Cygwin

    Change directory to the shell script file location in Cygwin
  4. Now, make the shell script file executable through this command:

    chmod +x [ShellFileName].sh
    Make the shell script file executable

    Make the shell script file executable
  5. Now, use the following syntax to run the shell script file:

    ./[ShellFileName].sh
    Run shell script file on Windows using Cygwin

    Run shell script file on Windows using Cygwin

These are the two methods to run shell script files (.SH) on a Windows PC. Of course, there are many other third-party tools available that allow you to run Linux and Unix files on a Windows computer.

Frequently Asked Questions (FAQs)

How to create a shell script (.SH) file?

I you know what you want to write inside the shell script file, all you need to do is follow these simple rules:
– Create a new notepad file
– Start the script with “#! /bin/sh”
– Write the code below it
– Save the file with a “.sh” extension
– To run the script, type “bash [FileName].sh” after navigating to the folder.

Can I run shell scripts on Windows?

Yes, shell script files can be executed on a Windows computer using Windows Subsystem for Linux, or third-party tools like Cygwin, kiTTY, ConEmu, Cmder, etc.

Why use shell scripts on Windows?

Shell scripts are used to perform repetitive tasks to save time and resources. They are also used to automate tasks. With the WSL feature, Microsoft has opened doors to natively run shell scripts on Windows operating systems.

Home

Windows

By

Anup Thapa


How To Run Sh. Or Shell Script In Windows

Files with the .sh extension, i.e., shell scripts, are designed to be run by Unix shells such as Bourne or GNU Bash. If you attempt to run shell scripts in Windows, it won’t work as the commands won’t be recognized by default.

Instead, you’ll have to introduce a compatibility layer to be able to run such scripts in Windows. There are various ways to do this, with the popular ones being Windows Subsystem for Linux, Cygwin, and Git Bash.

In this article, we’ve listed all the necessary steps to run Shell Scripts in Windows using these methods.

Windows Subsystem For Linux

The first method is to install a Linux distro through the Windows Subsystem for Linux feature. Cygwin and Git are convenient, but users often have difficulty running complex shell scripts and Linux applications with them. As such, WSL is the recommended option. Here are the necessary steps for this:

  1. Press Win + R, type optionalfeatures, and press Enter. 
  2. Enable the Windows Subsystem for Linux and Virtual Machine Platform features, and press OK.
    windows-subsystem-for-linux-virtual-machine-platform

  3. After the changes are applied, restart the computer.
  4. When booting, press the BIOS key (Fn keys or Del).
  5. Go to the Advanced CPU Configuration or similar section and look for the virtualization option. It will be named something like AMD-V, SVM, VT-d, or VT-x.
  6. Enable the virtualization option if it isn’t already so, and press F10 to save the changes and exit.
    gigabyte-svm

  7. After booting, download and install the WSL2 Linux Kernel Update Package.
  8. Press Win + R, type powershell, and press Enter.
  9. Execute the following command to set WSL 2 as the default version when installing new Linux distros:
    wsl --set-default-version 2
  10. Open the WSL Store, select your preferred distro, and press Get to download it. If you’re unable to install WSL Linux Distros from the Microsoft Store, you can directly download and install them using these links provided by Microsoft.
    get-debian-microsoft-store

  11. After it’s downloaded, press Open.
  12. On the first launch, the installation will take a couple of minutes.
  13. After the installation completes, enter a new UNIX username and password.
    wsl-debian-installation

  14. Before anything else, it’s good practice to update and upgrade your packages. On Debian-based distros, you can do this with the following command:
    sudo apt update && sudo apt upgrade
    wsl-debian-sudo-apt-update

  15. Navigate to the location of the script file.
  16. Hold Shift, right-click, and select Open Linux Shell here.
  17. Enter sh scriptname.sh to run the shell script.
    wsl-shell-script-in-windows

Note: For common WSL issues encountered both during and after the installation, we recommend referring to this troubleshooting guide from Microsoft.

Use Cygwin

Cygwin is a run time environment used to run code designed for Unix environments on Windows. Here’s how you can run shell scripts in Windows using Cygwin:

  1. Download and launch the Cygwin installer.
  2. Select Install from Internet as the download source.
  3. Specify the root directory to install Cygwin to. Also, select whether Cygwin should be available for all users or just the current one.
  4. Select the default options for local package directory and internet connection.
  5. For the download site, choose a mirror geographically close to you if possible. Otherwise, any mirror will do fine. The difference in download speed shouldn’t be anything major.
  6. Don’t select any packages for the time being. Just press Next and follow the on-screen instructions to complete the installation.
    cygwin-installation-confirm-changes

  7. Open the Cygwin64 Terminal and navigate to the location where the shell scripts are stored.
    cd <scriptpath>
  8. Use the following command to run the shell script:
    sh scriptname.sh
    cygwin-shell-script-in-windows

Use Git Bash

During its installation, Git optionally adds some UNIX tools to the PATH in Windows, with sh.exe being one of them. Here’s how you can install Git and run shell scripts using Git bash:

  1. Download and install Git.
  2. During the installation, make sure to include Git bash and add Git to the PATH variable.
    git-bash-windows-integration

  3. After the installation is complete, navigate to the folder with the shell script.
  4. Right-click on an empty area and select Show More Options > Git bash here.
  5. Once again, use the sh scriptname.sh command to run the shell script.
    git-bash-shell-script-in-windows

Running Shell Script in Android

This Project/Repo is creating as guide on how to run a shell script in an Android Device

Prerequisites:

  1. Having a rooted device helps, but I don’t think it is necessary.
  2. Android Debug Bridge installed on your computer.
  3. USB cable to connect the Android device to your computer (I use a MacBook Pro)

Steps:

  1. Connect Android phone to computer with USB cable.
  2. Open new Terminal window on your computer.
  3. Run “adb shell” command on the Terminal.
  4. Run “ls” next.

Here’s what step 3 and 4 outputs should look like —

Running Script in Android

  1. Run “cd data/local/tmp” next.
  2. If you’re doing this for the first time, this directory is probably empty and doing an “ls” may not show anything. Also, “ls” at /data/ or at /data/local/ will probably give you permission denied, but go all the way in till data/local/tmp and you should be fine.
  3. Now open any text editor and create a new file with the first line as —
    #!/bin/sh

I saved my shell script file as “get_process_info.sh”.
If you want to name your’s something else that’s no problem but then change the filename in the step number 10. “ps -e” is the command that lists out all running processes on a Linux based device, so here’s what my script file looks like —

  1. Now leave the current terminal window as it is and open another fresh new Terminal window.
  2. Run “cd Desktop” on this new terminal. (or whichever path you saved your script file in).
  3. Next run “adb push get_process_info.sh /data/local/tmp” (replace ‘get_process_info.sh’ with your file’s name from step 7)
    This step should push your script file into the location /data/local/tmp.
  4. Go back to the previous Terminal window that we left open in step 8.
  5. Run “ls” command. You should see your file listed in its output-

Running Script in Android

13. In this terminal itself, run “chmod 777 get_process_info.sh” next. (obviously replace filename with your’s).

This step basically changes the read/write permissions of your shell script file to root user i.e. allows my script to fetch metadata of all system level processes as well. You may skip this step if root access is not needed for your script’s application in particular.
14. You may run “ls -l” to verify that the read/write permission did in fact get updated to root. It would look something like the image after step 15. (see highlighted in blue)
15. Next run the shell script file to verify if it yields the desired result. “./get_process_info.sh”. Here’s what the result would be —

Running Script in Android

With Help from:

https://utkarshopalkar.medium.com/how-to-run-shell-scripts-on-the-android-os-shell-from-within-your-java-react-native-android-app-72455e78948b

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как включить другой рабочий стол на windows 10
  • Копия виндовс не прошла проверку на подлинность windows 7 как убрать уведомление
  • Mmdevapi audioendpoints драйвер windows 10 x64 микрофон
  • Как увеличить объем видеопамяти на ноутбуке windows 10
  • Какие драйвера нужны для windows 10 для интернета