Skip to content

Here I made a dialog menu using Shell Script, A menu box display a list of choices to the user in the form of a menu.... First of all, to made this, I used a free and open-source terminal emulator, serial console and network file transfer application -- PuTTY.

License

Notifications You must be signed in to change notification settings

daniel2IT/SHELL_Dialog_Menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How do I run .sh file shell script in Linux?

How do I Install dialog command?

Bash Image

The procedure to run the .sh file shell script on Linux is as follows:

--

Set execute permission on your script:

chmod +x script-name-here.sh

To run your script, enter:

./script-name-here.sh

or

sh script-name-here.sh

or

bash script-name-here.sh

Install dialog command

install dialog bash

Type the following command to install the dialog command line utility under Debian or Ubuntu Linux:

First Of All Use

  • sudo apt-get update install dialog bash

After That For:

Ubuntu

  • sudo apt-get install dialog

Debian

  • apt-get install dialog

Red hat

  • yum install dialog

Suse

  • zypper install dialog

install dialog bash

GUI method to run .sh file

Select the file using mouse. Right-click on the file. Choose Properties:

Bash Image

Click Permissions tab. Select Allow executing file as a program:

Bash Image

Now click the file name and you will be prompted. Select “Run in the terminal” and it will get executed in the terminal.

How do I run .sh in Windows ?

Execute Shell Script using Ubuntu on Windows 10

Make sure you have Ubuntu or any other Linux distros installed. Ubuntu will mount or make all your Windows directories available under /mnt. So the C drive is available at /mnt/C. So if the desktop will be available at /mnt/c/users//desktop.

Bash Image

--

Now follow these steps

  • Launch Ubuntu or any other Linux distros installed.
  • Navigate to the folder using “cd” command to the folder where the scripts are available. (use cd and ls commands)
  • Type “./zmones.sh" or "sh zmones.sh" or "bash zmones.sh” and hit enter.

zmones.sh i mean eq ==> zmones_LTU.sh or zmones_ENG.sh

It will execute the script, and if they have a dependency on any of core Linux features.

How it locks like

Bash Image

Bash Image

About

Here I made a dialog menu using Shell Script, A menu box display a list of choices to the user in the form of a menu.... First of all, to made this, I used a free and open-source terminal emulator, serial console and network file transfer application -- PuTTY.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages