Why a script file .sh on ubuntu is not in green as the others?

On Ubuntu 20.04 there's a directory with a bunch of .sh files in it. Except one all are in green. Would someone please tell how that can be and what makes that particular .sh file so special?

2

1 Answer

It is because that file has no execute permission. The ls program shows the names of executable files in green. Try listing with ls -l - the permissions will be listed to the left of the filenames. r means read, w means write, and x means execute. There are three sets of permissions - a set for the owner of the file, a set for the group associated with the file (ls -l also lists these), and a set for "others" which is any user or program. To make the file executable for the owner, you can run chmod u+x, for example.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like