0Pricing
Linux Command Line Mastery · Aula

Navegação básica: `cd`, `ls`, `pwd`

Aprenda a navegar pelo sistema de arquivos, listar o conteúdo de diretórios e identificar sua localização atual.

Navegação básica: `cd`, `ls`, `pwd` é uma aula grátis de Linux Command Line Mastery no CoddyKit. Esta é a aula 2 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Linux Command Line Mastery, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Linux Command Line Mastery inclui 4 aulas no total.

Partes desta aula ainda não foram traduzidas e aparecem em inglês.

Navigating Your Linux System

The Linux file system is a tree rooted at /. This lesson covers the commands to move around it and see what’s inside each directory.

Where Am I? The `pwd` Command

Lost your place? pwd (print working directory) shows the full path of where you are right now — your “you are here” sign.

See Your Current Path with `pwd`

Run pwd to see your current directory — likely something like /home/user.

pwd

What's Here? The `ls` Command

ls (list) shows the files and folders in your current directory — or any directory you point it at.

Listing Directory Contents with `ls`

Let’s make a folder and a file, then run ls to watch them show up.

mkdir my_documents
touch notes.txt
ls

Moving Around: The `cd` Command

cd (change directory) moves you around the file system. Give it an absolute path (from /) or a relative one (from where you are).

Changing with Absolute Paths

An absolute path starts at the root /, so it always points to the same place no matter where you currently are.

mkdir -p /tmp/my_project/src
cd /tmp/my_project/src
pwd

Changing with Relative Paths

A relative path starts from your current spot — shorter and handy. Use . for here and .. for the parent directory.

mkdir -p project/images
cd project
pwd
cd images
pwd
cd ..
pwd

Useful `ls` Options: `-l` and `-a`

Two essential ls flags: -l for a long listing (permissions, size, date) and -a to reveal hidden dotfiles.

touch .config_file
touch public_file
ls -a
ls -l

Test Your Navigation Skills

Consider the following sequence of commands executed in a terminal:

mkdir my_app
cd my_app
mkdir assets
touch assets/image.png
cd ..
ls

Recap: Navigate Like a Pro!

Navigation locked in! pwd shows where you are, ls lists contents, and cd moves you around with absolute or relative paths.

Perguntas Frequentes

A aula “Navegação básica: `cd`, `ls`, `pwd`” é grátis?

Sim — o texto completo de “Navegação básica: `cd`, `ls`, `pwd`” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Linux Command Line Mastery, atualize para CoddyKit PRO. O curso de Linux Command Line Mastery inclui 4 aulas no total.

O que vou aprender em “Navegação básica: `cd`, `ls`, `pwd`”?

Aprenda a navegar pelo sistema de arquivos, listar o conteúdo de diretórios e identificar sua localização atual. Você pratica Linux Command Line Mastery com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.

Preciso ter experiência prévia para começar Linux Command Line Mastery?

Nenhuma experiência prévia é necessária. Linux Command Line Mastery no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 2 de 4.

Quanto tempo leva a aula “Navegação básica: `cd`, `ls`, `pwd`”?

A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.

Posso escrever e executar código nesta aula de Linux Command Line Mastery?

Sim. Cada aula de Linux Command Line Mastery inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.

Todas as aulas deste curso

  1. Introdução ao shell do Linux
  2. Navegação básica: `cd`, `ls`, `pwd`
  3. Gerenciamento de arquivos e diretórios: `mkdir`, `rm`, `cp`, `mv`
  4. Obtendo Ajuda: man, --help e tldr
← Voltar para Linux Command Line Mastery