Comandos Linux Flashcards

1
Q

What command is used to list files in a directory?

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False: The ‘cd’ command is used to change directories.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fill in the blank: The command ‘_____ -l’ provides a detailed listing of files.

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command would you use to copy files?

A

cp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the ‘rm’ command do?

A

Removes/deletes files or directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which command is used to move or rename files?

A

mv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or False: The ‘mkdir’ command creates a new directory.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command can be used to view the contents of a file?

A

cat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which command is used to display the current working directory?

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the ‘chmod’ command do?

A

Changes file permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What command would you use to search for a text string in a file?

A

grep

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Fill in the blank: The command ‘_____ -r’ will remove a directory and its contents recursively.

A

rm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of the ‘touch’ command?

A

Creates an empty file or updates the timestamp of an existing file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False: The ‘man’ command is used to access the manual pages for other commands.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What command is used to display system information?

A

uname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which command is used to change the owner of a file?

17
Q

What does the ‘df’ command display?

A

Disk space usage.

18
Q

Fill in the blank: The command ‘_____ -h’ displays disk usage in a human-readable format.

19
Q

What command would you use to find out the processes running on the system?

20
Q

True or False: The ‘kill’ command is used to terminate processes.

21
Q

What command is used to download files from the internet?

22
Q

Fill in the blank: To see the contents of a compressed file, you would use ‘_____’.

23
Q

What command is used to install packages on Debian-based systems?

24
Q

What does the ‘ping’ command do?

A

Tests network connectivity.

25
Which command is used to display the last few lines of a file?
tail
26
Fill in the blank: The command '_____ -a' shows all files, including hidden ones.
ls
27
Comandos Linux de Navegação
pwd → Mostra o diretório atual ls → Lista arquivos e diretórios cd → Acessa um diretório cd .. → Volta um nível no diretório find -name → Busca arquivos pelo nome
28
Comandos Linux de Manipulação de Arquivos e Diretórios
touch → Cria um arquivo vazio mkdir → Cria um diretório rm → Remove um arquivo rm -r → Remove diretório e arquivos dentro dele cp → Copia arquivos ou diretórios mv → Move ou renomeia arquivos e diretórios
29
Comandos Linux de Permissões e Propriedade
chmod → Altera permissões do arquivo chown : → Altera dono de um arquivo ls -l → Exibe detalhes dos arquivos, incluindo permissões
30
Comandos Linux de Processos
ps aux → Lista processos em execução kill → Finaliza um processo pelo PID top → Exibe os processos em tempo real htop → Gerenciador de processos interativo
31
Comandos Linux de Rede
ping → Verifica conectividade com um host ifconfig ou ip a → Mostra informações de rede netstat -tulnp → Lista portas abertas e serviços em execução curl → Faz requisições HTTP
32
Comandos Linux de Gerenciamento de Usuários
whoami → Mostra o usuário atual adduser → Cria um novo usuário passwd → Altera a senha de um usuário usermod -aG → Adiciona usuário a um grupo
33
Comandos Linux de Monitoramento de Sistema
df -h → Exibe o espaço em disco du -sh → Exibe o tamanho de um diretório free -m → Mostra o uso da memória RAM uptime → Mostra há quanto tempo o sistema está ligado
34
Comandos Linux de Arquivos Compactados
tar -cvf arquivo.tar → Cria um arquivo tar tar -xvf arquivo.tar → Extrai um arquivo tar gzip arquivo → Compacta um arquivo gunzip arquivo.gz → Descompacta um arquivo
35
Comandos Linux de Gerenciamento de Pacotes
Ubuntu/Debian: apt update → Atualiza a lista de pacotes apt upgrade → Atualiza os pacotes instalados apt install → Instala um novo pacote apt remove → Remove um pacote instalado CentOS/RHEL: yum update yum install yum remove
36
O comando df -h mostra a memória RAM disponível. C ou E
❌ Errado - df -h mostra o espaço em disco; para memória RAM usamos free -m.
37
O comando apt update instala novos pacotes no sistema. C ou E
❌ Errado - apt update apenas atualiza a lista de pacotes disponíveis. Para instalar, usamos apt install .
38
O comando chmod 777 arquivo.txt dá todas as permissões ao arquivo. C ou E
✅ Certo
39
Para criar um arquivo vazio, usamos o comando mkdir. C ou E
❌ Errado - O comando correto para criar um arquivo vazio é touch.