Use the rm command to remove files. Specify the absolute path.
rm /home/tom/Desktop/hello.txt
Navigate to your home directory, then move the folder.
cd ~ mv firstfolder/ /home/tom/Desktop/
Navigate to the moved directory and create a new script using nano.
cd Desktop/firstfolder nano script.sh
Add this content to your script.sh file:
#!/bin/bash echo "Hello! $(whoami)" echo "The current date/time is: $(date)"
#! #!/bin/bash — Shebang specifying the Bash interpreter
echo Prints messages to the console
$( ) Command substitution — executes the command inside
First make it executable, then run it.
chmod a+x script.sh ./script.sh
You've successfully learned to manage files, set permissions, and create your first bash script!
Get your domain name from Namecheap and get it set up with the steps in this guide.
Check Domain Availability