make_a_file_executable
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
make_a_file_executable [2016/07/25 18:44] – created walkeradmin | make_a_file_executable [2017/01/29 17:58] – walkeradmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Make a file Executable ====== | ====== Make a file Executable ====== | ||
+ | <color darkorange> | ||
+ | |||
+ | ---- | ||
+ | |||
\\ | \\ | ||
- | Raspbian Jesse changed the way a static IP Address | + | Unlike Windows, Linux does not have files that are executable, all files can have this attribute. So for example, I have a python file that is just a text file, and I will to be able to run this from the command line, If I look at the file using ls -al: |
\\ | \\ | ||
- | To edit the dhcpcd.conf file, enter: | + | ls -al |
\\ | \\ | ||
- | sudo / | + | I will see something like this: |
\\ | \\ | ||
- | At the end of the file add the following lines (with your own IP Address values) | + | " |
+ | \\ | ||
+ | The permissions for this file are: | ||
\\ | \\ | ||
+ | " | ||
\\ | \\ | ||
- | eth0 | + | This file has three sets of permissions: |
+ | \\ | ||
+ | User -rw | Group -r- | Others r-- | ||
+ | |||
+ | where r is read - w is write - x is execute | ||
+ | \\ | ||
+ | \\ | ||
+ | I will cover permissions in another section, to give this file ' | ||
+ | \\ | ||
+ | chmod 777 40x2_LCD.ph | ||
+ | \\ | ||
+ | If we look at the permissions now by using: | ||
+ | \\ | ||
+ | ls -al | ||
+ | \\ | ||
+ | We will see: | ||
+ | \\ | ||
+ | " | ||
+ | \\ | ||
+ | Now we can execute this file (assuming it contains something valid that is executable) | ||
+ | \\ | ||
+ | ./ | ||
+ | \\ | ||
+ | The file will now be executed. | ||
+ | \\ | ||
+ | \\ |
make_a_file_executable.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1