Activity Steps
Activity Steps
1. Open Terminal:
o Launch the terminal application on your Linux system. You can typically find
it in the applications menu or by using a keyboard shortcut like Ctrl + Alt +
T.
2. Navigate the File System:
o Use the following commands to navigate around the file system:
pwd: Print the current working directory.
ls: List directory contents.
cd: Change directory.
Example:
bash
Copy code
pwd # Shows the current directory
ls # Lists contents of the current directory
cd / # Change to the root directory
ls # Lists contents of the root directory
Example:
bash
Copy code
touch example.txt # Creates a new file named example.txt
mkdir mydirectory # Creates a new directory named mydirectory
cp example.txt mydirectory/example.txt # Copies example.txt into
mydirectory
mv example.txt newname.txt # Renames example.txt to
newname.txt
rm newname.txt # Removes newname.txt
Example:
bash
Copy code
cat example.txt # Displays the contents of example.txt
less example.txt # View contents of example.txt with navigation
(press 'q' to exit)
head -n 10 example.txt # Displays the first 10 lines of example.txt
5. Execute Basic Commands:
o Practice running basic commands such as date, cal, or echo.
Example:
bash
Copy code
date # Displays the current date and time
cal # Displays a calendar for the current month
echo "Hello, Linux!" # Prints the text "Hello, Linux!"
Example:
bash
Copy code
ls -l # Lists contents in long format
ls -a # Lists all files including hidden ones