0

I would like to make a python script that would do some work with interfaces file in Linux.

How I may make this script executable in Linux? I would to open it with sudo and it would do some commands in terminal.

3
  • duplicate of stackoverflow.com/questions/11068477/… ? all the answers are already there. Commented Sep 23, 2016 at 19:58
  • Some people have come to think that sudo is normal, but don't use sudo unless you know that your commands actually need root permissions. Commented Sep 23, 2016 at 20:00
  • 1
    It does ! I want to compleatly remove the interfaces file and replace it with new one. Commented Sep 23, 2016 at 20:17

1 Answer 1

2

Make callable

chmod u+x <filename here>

first line in file with shebang to determine how the script should be executed:

#!/usr/bin/python3

execute with

./<filename here>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.