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
step 2: add this code
inside the file, add the following:
#!/bin/bash
echo "hello! this is my custom command."
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
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/
step 5: run your command from anywhere!
now, you can type:
mycommand
and it will print:
hello! this is my custom command.
that’s it! you’ve successfully created your own custom command in parrot os. 🔥
Top comments (0)