Make the script executable
A script is just a plain text file. You have to tell Ubuntu that that the file is executable. There are various way of doing it.
In a Terminal
The command line method is tow type the command:
chmod +x tasksheet
After this command if you run ls -l tasksheet again you will see a x
like -rwxr...
in the output. The x
indicates the file is now executable.
The GUI and Mouse way
Open the app Files (AKA Nautilus) and right click on the file tasksheet
inside Files.
Select Properties from the right click context menu. Go to the Permissions tab:

Check the box Allow executing file as program.
You only need to do one or the other, not both. After that, you can use the command:
.tasksheet
See How can I make a script executable? for more.
Additional Guidance
You must have typed cd /bin
to get to the prompt:
roger@roger-Precision-Tower-3620:/bin$
If you intended to go to /home/roger/bin/
, you should type cd bin
. The you will see the prompt:
roger@roger-Precision-Tower-3620:~/bin$
Note the ~
before the /
.
Then you have typed:
roger@roger-Precision-Tower-3620:/bin$ ./ tasksheet
# There should be no space here ↑
Try ./tasksheet. That is:
roger@roger-Precision-Tower-3620:/bin$ ./tasksheet
If you have moved the file tasksheet
from /home/roger/
to /bin
. This is not recommended. Important system programs and utilities are located in /bin. This folder is not for your personal scripts. See this guide on Linux directory Structure for more.
From Where should I put my Bash scripts? :
If you are the only person who is going to use this script, I recommend you move it to /home/roger/bin/
.
If you have other user accounts and other people who customarily login to this computer are expected to use this script, I recommend you move it to /usr/local/bin/
.
All these folders:
/bin/
/home/roger/bin/
/usr/local/bin
are in the the PATH environmental variable. So, you don't have to use cd /bin
or cd bin
followed by ./tasksheet
.
You can just type tasksheet
as if it is a command, like this:
roger@roger-Precision-Tower-3620:$ tasksheet
Note, the command prompt above indicates you are at the default location when you open a terminal while logged in as the user roger
.
Hope this helps