1.2 KiB
1.2 KiB
WSL / Ubuntu Exercise — "My First Project"
Goal: Create a project folder, add files, edit them, and explore.
Time: ~10 minutes
Step 1 — Create a folder and go inside
mkdir my-project
cd my-project
Step 2 — Create a file with some text
echo "Hello from WSL!" > hello.txt
Now look at what's in the folder:
ls
Step 3 — View the file
cat hello.txt
Step 4 — Edit the file
nano hello.txt
Inside nano:
- Add a new line (e.g.
Today I am learning Linux commands.) - Save: Ctrl + O, then Enter
- Exit: Ctrl + X
Step 5 — See your changes
cat hello.txt
Step 6 — Create a backup folder and copy the file
mkdir backup
cp hello.txt backup/
ls backup/
Step 7 — List everything in detail
ls -la
Notice the file sizes, dates, and permissions.
Step 8 — Clean up (go back home)
cd ~
Commands you used: mkdir, cd, echo, ls, cat, nano, cp, ls -la
What you learned:
- Creating and navigating folders
- Creating, viewing, and editing files
- Copying files and listing details