Execute a Repetitive Task

In Linux, you have to familiarize yourself with the terminal prompt even with basic tasks. So when even a simple mount becomes a chore, it comes handy to just save it in a file and give the file an execute permission.

Here’s how to do it in Linux Mint:

1. Create a document

2. Enter your command to the newly created file, then save it. For example,

sudo mount -t cifs // /mnt/ -o username=xxxx,password=xxxx

Note: You have to put one command only per file.

3. Rename the extension to .sh (actually, this is optional)

4. Right-click on the file, and click Properties

5. Select the Permissions tab, and check the Allow executing file as program checkbox, then Close

6. Done.

When you are ready to execute the file, just double-click it. Then click Run in Terminal. At the prompt, enter your password. Voila, and you just made a shortcut to one tedious task.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s