Build Your Own AI Assistant Part 1 - Creating the Assistant
115007 Views
Is the new Raspberry Pi AI Kit better than Google Coral?
103855 Views
Control Arduino with Python using Firmata / PyFirmata
86426 Views
How to Map with LiDAR - using a Raspberry Pi Zero 2W, RPLidar and Rviz
55270 Views
Node-Red Automation, MQTT, NodeMCU & MicroPython
51306 Views
Creating a Supercomputer with a Raspberry Pi 5 Cluster and Docker Swarm!
50568 Views
Installing and Using DeepSeek-R1:1.5 on a Raspberry Pi with Docker
Gamepad & BurgerBot
Level Up your CAD Skills
Operation Pico
Raspberry Pi Home Hub
Hacky Temperature and Humidity Sensor
Using the Raspberry Pi Pico's Built-in Temperature Sensor
0h 24m
Getting Started with SQL
0h 32m
Introduction to the Linux Command Line on Raspberry Pi OS
0h 42m
How to install MicroPython
0h 8m
Wall Drawing Robot Tutorial
0h 22m
BrachioGraph Tutorial
0h 16m
Learn Linux from the basics to advanced topics.
Learn how to use a Raspberry Pi Pico
Learn MicroPython the best language for MicroControllers
Learn Docker, the leading containerization platform. Docker is used to build, ship, and run applications in a consistent and reliable manner, making it a popular choice for DevOps and cloud-native development.
Learn how to build SMARS robots, starting with the 3D Printing the model, Designing SMARS and Programming SMARS
Learn how to build robots, starting with the basics, then move on to learning Python and MicroPython for microcontrollers, finally learn how to make things with Fusion 360.
Learn Python, the most popular programming language in the world. Python is used in many different areas, including Web Development, Data Science, Machine Learning, Robotics and more.
Learn how to create robots in 3D, using Fusion 360 and FreeCAD. The models can be printed out using a 3d printer and then assembled into a physical robot.
Learn how to create Databases in Python, with SQLite3 and Redis.
KevsRobots Learning Platform
12% Percent Complete
By Kevin McAleer, 4 Minutes
Navigating the filesystem is a fundamental skill when working with the command line. In this lesson, you’ll learn how to use basic commands to find your way around the Raspberry Pi OS filesystem.
pwd
ls
cd
clear
history
The Linux filesystem is organized in a hierarchical structure, starting from the root directory (/). Every file and directory is nested within this structure. Here’s a basic overview:
/
/home
/home/pi
/etc
/var
/usr
/bin
/lib
/opt
/tmp
The pwd (print working directory) command displays the current directory you are in. This is useful to know where you are in the filesystem.
The ls (list) command lists the contents of a directory. You can use it to see files and subdirectories within your current directory.
You can also use options with ls to get more detailed information:
ls -l
The cd (change directory) command allows you to navigate between directories. For example, to move into the Documents directory, you would type:
Documents
cd Documents
To return to the home directory, simply type:
cd $HOME
To back up one directory, use:
cd ..
/home/pi/Documents
To clear the terminal screen, you can use the clear command:
This will clear the terminal screen, making it easier to read the output of new commands.
The history command is a useful tool that shows you a list of the commands you’ve previously run in the terminal. This can help you remember commands you’ve used before or quickly repeat them without typing them out again.
To see your command history, simply type:
This will display a numbered list of your recent commands.
You can easily re-run a command from your history by using the ! symbol followed by the command number. For example, if the command you want to repeat is number 42 in the history list, you can type:
!
!42
This will execute the command exactly as you ran it before.
Repeating the Last Command: If you want to run the very last command again, you can use !!:
!!
This is handy if you forgot to use sudo and want to rerun the command with it.
sudo
Searching Your History: You can search for a previous command by typing Ctrl + r and then start typing part of the command. This will show you the most recent match from your history, which you can then execute by pressing Enter.
Ctrl + r
Enter
In this lesson, you learned how to navigate the filesystem using the pwd, ls, cd, clear and history commands, and you now understand the difference between absolute and relative paths. These are essential skills for working efficiently in the command line.
< Previous Next >