Norscax Posted May 8, 2018 Share Posted May 8, 2018 how do i save a file as .bat to run cli on ubuntu? o tried but it doesnt work Quote Link to comment Share on other sites More sharing options...
goldKeeper Posted May 8, 2018 Share Posted May 8, 2018 you need to save it as .sh and make it executable Quote Link to comment Share on other sites More sharing options...
Norscax Posted May 8, 2018 Author Share Posted May 8, 2018 1 minute ago, goldKeeper said: you need to save it as .sh and make it executable and do u make it exucutable? Quote Link to comment Share on other sites More sharing options...
goldKeeper Posted May 8, 2018 Share Posted May 8, 2018 you can either right click it and look for permissions tab and set it to executable for the owner or if you are familiar with the terminal just do chmod +x fileName.sh and execute it with ./fileName.sh Quote Link to comment Share on other sites More sharing options...
Norscax Posted May 8, 2018 Author Share Posted May 8, 2018 16 minutes ago, goldKeeper said: you can either right click it and look for permissions tab and set it to executable for the owner or if you are familiar with the terminal just do chmod +x fileName.sh and execute it with ./fileName.sh did the first part and was able to click on execute but nothing pops up Quote Link to comment Share on other sites More sharing options...
goldKeeper Posted May 8, 2018 Share Posted May 8, 2018 then execute it in terminal and tell us the error. You can execute in the terminal with either ./file.sh or bash filename.sh and if you are not at the right directory then do bash /path/to/file/file.sh Quote Link to comment Share on other sites More sharing options...
Prolax Posted May 9, 2018 Share Posted May 9, 2018 Just do this: chmod 755 fileName.sh ./fileName.sh Quote Link to comment Share on other sites More sharing options...