Chapter 18 · Hands-on: set up your AI workbench
Terminal basics for AI work
A terminal is a text window where you type commands; a handful of them is all these tutorials need.
Chapter 18 · Hands-on: set up your AI workbench
A terminal is a text window where you type commands; a handful of them is all these tutorials need.
Every command follows the same pattern: you type a line and press Enter, the computer does the job, and the result prints under it. The $ is just the prompt; you never type it.
Open your terminal (see the previous lesson) and go to the ai-workbench folder you made. After typing each command, press Enter. Windows examples use PowerShell, which understands these same short names.
pwd means “print working directory”. It shows the folder the terminal is currently in. Every command you run happens in this folder.
pwdCheck: a path prints, such as /home/you or C:\Users\you.
ls lists the files and folders in the current folder. An empty folder prints nothing, and that is fine.
lsCheck: you see a list of names, or nothing if the folder is empty.
mkdir makes a folder. cd means “change directory”: it moves you into a folder. cd .. (cd, a space, two dots) moves you back up one level.
mkdir practice
cd practice
pwd
cd ..
lsCheck: the second pwd ends in practice, and the final ls shows practice in the list.
To run a program, type its name and press Enter. Many programs accept an option such as --version, which asks them to introduce themselves. Python may not be installed yet; that is the next lesson.
python --versionCheck: either a Python version prints, or the terminal says the command is not found. Both are fine for now.
cd pra then press Tab.Check: Tab completes practice, and the up arrow repeats your last command.
Pick what each command does, then press Check.
pwdlsmkdir practicecd practicepython --versionWhich command shows the folder you are in?
What does cd .. do?
You type python --version and see ‘command not found’. What does it most likely mean?