0

I am new to Linux. I have copied the bash program from bin to a thumb drive. I have renamed it to "ebash". Now I connect this thumb drive to other Linux machine. I have mounted this drive and navigated to the directory where I have placed ebash through terminal.

Now I run a script like this with root access.

# ebash script.sh

The output looks like

No command 'ebash' found, did you mean:
 Command 'bash' from package 'bash' (main)
 Command 'rbash' from package 'bash' (main)
ebash: command not found

I want to execute the script using ebash now.

The first line of the script I have written is

#!/mnt/mntpoint/Tools/ebash

Is this the write procedure to execute the script using a trusted shell? If not please help me with the correct procedure.

1 Answer 1

0

To execute a script you've downloaded as a file, you'll want to ./ebash instead of ebash. What this does is it executes from the current directory (./) the file named ebash.

Typing in ebash looks for that command to be installed in /bin or another place and would not look to execute files in external directories.

2
  • 1
    Thanks a lot. First line of the code i have written is "#!/mnt/evid-collector/Tools/ebash". Does this line effect my code.
    – sudheer
    Mar 31, 2015 at 3:44
  • Not in this case. Normally that first line is to tell what program is used to run a script, but you're already using your ebash to run it. Mar 31, 2015 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .