Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Help 

Linux command shortcut [linux]

so im looking for a way i can add a shortcut to my home screen (desktop) and when clicked it will open terminal and run a command as im not good at remembering some of them.

Example: i sometimes run 'nmcli d wifi' that shows current wifis and signals. i was wondering if theres a way that i can just dobble click a shortcut on the desktop and it runs that for me ??

thanks aha, this could be simple but i personally dont know of it
Code
#!/bin/bash
nmcli d wifi

Save this and run it using

Code
bash filename

You could also add an alias by editing (~/.bashrc), for example:

Code
alias wifi='nmcli d wifi'

and then just type "wifi" on the terminal.
(Sep 16, 2017 03:02 PM)genu Wrote:  
Code
#!/bin/bash
nmcli d wifi

Save this and run it using

Code
bash filename
I got this and love it. set it up with a few useful commands to open programs and stuff Thanks :D


(Sep 16, 2017 03:02 PM)genu Wrote:  You could also add an alias by editing (~/.bashrc), for example:

Code
alias wifi='nmcli d wifi'

and then just type "wifi" on the terminal.

cant seem to get this one working, i opened and edit the bashrc in nano and save it, when i try to run (called with wifian as wifi is already taken by tlc) it dosent work, just returns and error. anyways i got the bash file working great


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Help] by derell77Nov 16, 2016 11:51 AM 1 139 Nov 16, 2016 11:51 AM
Last Post: Sajuuk
by xVipXMar 20, 2015 12:17 AM 6 420 Mar 20, 2015 12:17 AM
Last Post: Shinigami_
by /{evin Mitnic/{Nov 22, 2011 04:24 AM 2 112 Nov 22, 2011 04:24 AM
Last Post: /{evin Mitnic/{