DEV Community

tamilvanan
tamilvanan

Posted on

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. 🔥

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay