Linux Basics
This module will teach you the basics of using Linux, specifically on the command line. The command line (also called the terminal or shell) is a way to control your computer by typing instructions instead of clicking on buttons. You type a command, press Enter, and the computer follows your instructions — like opening a file, moving something, or searching for a word. It might look plain, but it's a powerful tool!
If you ever forget a command you've learned, check out the Cheat Sheet below!
Linux Commands Cheat Sheet
cd- change directory (move into a folder)cd [folder_path]- Use
cd ..to go up one folder level
ls- list files and folders in the current directorypwd- print working directory (shows the full path to your current folder)touch- create a new empty filetouch [filename]
rm- remove (delete) a filerm [filename]- Be careful — you can never get these files back!
mv- move or rename a filemv [source] [destination]- Use to rename:
mv oldname.txt newname.txt
cp- copy a filecp [source] [destination]- Keeps the original file and makes a copy!
cat- show the contents of a filecat [filename]
nano- open a simple text editor to write or edit a filenano [filename]- Will create a new file or open an existing one, depending on the filename you use
- Use
Ctrl + X->y->Enterto save and close
grep- search for text inside a filegrep [word_to_find] [filename]- Use
*to search all files in a folder:grep word *
Challenges
Running Commands
Starting…Open Workspace
Move through the Linux filesystem.
Starting…Open Workspace
Create and delete files.
Starting…Open Workspace
Move, copy, and rename files.
Starting…Open Workspace
Display file contents in the terminal.
Starting…Open Workspace
Create files with nano.
Starting…Open Workspace
Edit files with nano.
Starting…Open Workspace
Locate files on the Linux filesystem.
Starting…Open Workspace
Find the password! (Searching files)
Starting…Open Workspace
Advanced Directory Techniques.
Starting…Open Workspace
Learn about command flags.
Starting…Open Workspace