1. Open the Terminal
The terminal is where you type commands to talk to your computer. It might look scary at first, but it's actually just a text-based way to do things you'd normally do by clicking around.
Press those three keys at the same time and a terminal window will pop up!
chica@ubuntu:~$ ▊
💡 Tip: The ~ means you're in your home folder.
That's your starting point every time you open a new terminal.
2. See What's Here: ls
Before you go anywhere, you probably want to see what files and folders
are in your current location. That's what ls does — it lists everything.
chica@ubuntu:~$ ls
Desktop Documents Downloads Music
Pictures python-tutorials Videos
Folders show up in the list. Now you can see where to go!
ls stand for? "list" — it lists the contents of the current directory (folder).
3. Move Around: cd
Now that you can see your folders, you need to move into one.
cd stands for change directory (directory = folder).
chica@ubuntu:~$ cd python-tutorials
chica@ubuntu:~/python-tutorials$ ls
hello-python
chica@ubuntu:~/python-tutorials$ cd hello-python
chica@ubuntu:~/python-tutorials/hello-python$
Notice how the path after : changes as you move into folders?
That's how you always know where you are.
cd .. The two dots (..) mean "go up one level" — back to the parent folder.
cd ~ The tilde (~) always takes you back to your home folder, no matter where you are.
4. Open VS Code: code .
Once you're in the right project folder, you can open it in VS Code with one command.
The dot (.) means "this folder right here."
chica@ubuntu:~/python-tutorials/hello-python$ code .
VS Code will open with your project folder loaded in the sidebar. You'll see all your files ready to edit!
💡 Tip: You can also open the terminal inside VS Code! Go to Terminal → New Terminal in the menu, or press Ctrl + ` (the backtick key, above Tab).
5. Activate Your Python Environment
Remember virtual environments from the Getting Started tutorial? Before running Python code, you should activate your project's environment so it uses the right packages.
chica@ubuntu:~/python-tutorials/hello-python$ source .venv/bin/activate
(.venv) chica@ubuntu:~/python-tutorials/hello-python$
See the (.venv) at the beginning of the line? That means your
virtual environment is active! Now any Python packages you install or use will
be specific to this project.
deactivate This turns off the virtual environment and goes back to normal.
6. Run Your Code: python filename.py
With your environment activated, running a Python file is simple:
(.venv) chica@ubuntu:~/python-tutorials/hello-python$ python hello.py
Hello, World!
Just type python followed by the name of your file. That's it!
💡 Tip: Make sure you're in the same folder as your file,
or it won't find it. Use ls to check!
📋 Quick Reference Card
Here's everything in one place. Screenshot this or print it out!
lscd foldernamecd ..cd ~code .source .venv/bin/activatedeactivatepython filename.pyclear🎯 Putting It All Together
Here's the typical flow every time you sit down to code:
# 1. Open terminal with Ctrl+Alt+T, then:
chica@ubuntu:~$ cd python-tutorials/hello-python
# 2. Open VS Code
chica@ubuntu:~/python-tutorials/hello-python$ code .
# 3. Activate your environment
chica@ubuntu:~/python-tutorials/hello-python$ source .venv/bin/activate
# 4. Run your code!
(.venv) chica@ubuntu:~/python-tutorials/hello-python$ python hello.py
Hello, World!
That's your whole workflow! Open terminal → go to your project → open VS Code → activate environment → run code. You've got this! 💪