How to make file executable using terminal

by George Sruthin | Jul 18, 2017 | Howtos, Linux, Mac, OS, Security | 0 comments

To give permission to execute a file you should navigate to file copied location in terminal

by default when you open-up the terminal your terminal location will look some thing like this

george@Area51-HP-Pro-3330-MT ~ $

if you type "pwd"

you can see current directory in the terminal

george@Area51-HP-Pro-3330-MT ~ $ pwd

/home/george                                         <----  currently i have mounted to /home/user

for this tutorial i have copied file in a folder in the desktop so i have to navigate to that directory for eg: my folder name is called "Dashboard"

to navigate that folder i have to type in cd /Desktop/Dashboard

after that type ls so that you can list all files in the terminal

they type following command in the terminal , in my case i am using NVIDIA-Linux-x86_64-375.66.run file as executable this may vary with yours

sudo chmod +x ./NVIDIA-Linux-x86_64-375.66.run

* Note

sudo = root "super user " permission

 

chmod = The command name chmod stands for "change mode", and it is used to define the way a file can be accessed.

 

+x = this will execute a file

 

./ = if you are using a script .sh or .run you should use this following by the file name

 

if you use -x instead of +x this will remove file permission

 

sudo chmod -x ./NVIDIA-Linux-x86_64-375.66.run

This is will remove permissions

The Inspiration Behind This Article ⭐

Special thanks to Jake on LinkedIn for the inspiration behind this blog post. Your thoughts on the "Ivory Tower" concept encouraged me to expand on the idea and explore how it impacts leadership, IT, and organizational decision-making.

Written By George Sruthin

👋 Hi, I'm George Sruthin, founder of TechRidez. 💻 I help IT professionals solve real-world infrastructure challenges through practical guides on 🐧 Linux, ☁️ Cloud, 🖥️ Virtualization, 💾 Enterprise Storage, 🔐 Cybersecurity, 🌐 Networking, and ☁️ Backup Solutions.

Related Posts

Comments

0 Comments

0 Comments

Submit a Comment


Subscribe For Instant News, Updates, and Discounts

Pin It on Pinterest

Shares
Share This