DEV Community

tamilvanan
tamilvanan

Posted on • Edited on

1 1 1

Creating your own command (executable script) in parrot os

hello hackers!

in this blog, i’ll share how i created my own command on my parrot os machine.

let’s get started! 🚀

step 1: create a new script

open a terminal and create a new script using nano:

nano mycommand
Enter fullscreen mode Exit fullscreen mode

step 2: add this code

inside the file, add the following:

#!/bin/bash
echo "hello! this is my custom command."
Enter fullscreen mode Exit fullscreen mode

press ctrl + x, then y, and hit enter to save.

step 3: make it executable

run the following command to give execution permission:

chmod +x mycommand
Enter fullscreen mode Exit fullscreen mode

step 4: move it to /usr/local/bin/

to make the command accessible from anywhere, move it to /usr/local/bin/:

sudo mv mycommand /usr/local/bin/
Enter fullscreen mode Exit fullscreen mode

step 5: run your command from anywhere!

now, you can type:

mycommand
Enter fullscreen mode Exit fullscreen mode

and it will print:

hello! this is my custom command.
Enter fullscreen mode Exit fullscreen mode

that’s it! you’ve successfully created your own custom command in parrot os. 🔥

AWS reinvent image

Exclusive savings when you register before November 7!

Act now to save $150 using the following discount code: DEVEXJVu6vUt. This special discount is only available for the first 100 tickets booked on or before November 7th.

BONUS!!! Lock in your tickets! Receive $250 Delta Air Lines flight vouchers when you book using this discount code.

*Voucher will be sent to the email you use to register for re:Invent.
Register now

Top comments (0)

agentic postgres

An MCP Server That Actually Understands Postgres

We took 10+ years of Postgres experience and turned it into built-in prompts. Agents get tools for schema design, query optimization, and migrations, plus they can search Postgres docs on the fly.

Learn more