Sure, there is a way to do that. You have to write a shell script and then run it whenever you want. Every time the shell script is executed, the commands in it will be executed too. I wrote a quick example below. To run it you have to copy it in a directory of your preference, for example the /home directory, and then run the command sh /home/shell_script.sh. Notice that the file extension is .sh. You can change the name "shell_script" for any other name you want.
#!/bin/sh # Example of a shell script echo "" echo "Example of a shell script" echo "" # Run the 'pwd' command echo "Running the 'pwd' command.." pwd echo "" #Run the 'ls' command echo "Running the 'ls' command..." ls echo ""