Mapa de Comandos Essenciais ao Linux

Abaixo está a transcrição dos comandos principais, organizados por categorias:


📁 Arquivos e Navegação

ComandoDescrição
lsdirectory listing (list all files/folders on current dir)
ls -lformatted listing
ls -aformatted listing including hidden files1
cd dir2change directory to dir (dir will be directory name)3
cd ..4change to parent directory5
cd /dir6change to dir in parent directory7
cd /8change to home directory9
pwd10show current11 directory
mkdir dircreate a directory dir
rm filedelete file
rm -r dirforce remove file
rm -f fileforce remove file
rm -rf dirremove directory dir
mv file1 file2move file1 to file2
cp file1 file2copy file1 to file2
ln file1 file2move/link file1 to file2 as file2
touch filecreate an empty file
cat fileoutput contents of file
cat > filewrite content/output into file
cat >> fileappend standard input into file
tail -f fileoutput contents of file as it grows

🖥️ Informações do Sistema

ComandoDescrição
dateshow current date/time
uptimeshow uptime
w/whoshow who's logged in as
psdisplay processes
cat /proc/cpuinfodisplay cpu info
cat /proc/meminfomemory info
freeshow memory and swap usage
dushow directory space usage
du -shshow readable sizes in GB
dfshow disk usage
uname -ashow kernel config

🌐 Redes

ComandoDescrição
ping hostping host
whois domainshow whois for domain
dig domainget DNS for domain
dig -x hostreverse lookup host
wget filedownload file
wget -c filecontinue stopped download
wget -r urlrecursively download files from url
curl urldisplay the webpage from url
curl -o mail:mailto urlwrite a page to mail:mailto.html
ssh user@hostconnect/login as user
ssh -p port user@hostconnect using port
ssh -D port user@hostconnect & use bind port

⚙️ Processos

ComandoDescrição
psdisplay currently active processes
ps auxdetailed outputs
kill pidkill process with process id (pid)
killall prockill all processes named proc

📦 Compressão

ComandoDescrição
tar cf file.tar filestar files into file.tar
tar xf file.taruntar into current directory
tar tf file.tarshow contents of archive
Opções do tar:
c - create archivej - bzip2 compression
t - table of contentsw - ask for confirmation
x - extractk - do not overwrite
z - gzip/zipf - file from file
v - specify filenamev - verbose

🔒 Permissões

ComandoDescrição
chmod octal filechange permissions of file
Permissões (Octal):
4 - read (r)2 - write (w)
1 - execute (x)0 - no permission
order: owner/group/world
chmod 777 - rwx for everyonechmod 755 - rwx for owner, rx for group world

✨ Outros

ComandoDescrição
grep pattern filessearch in files for pattern
grep -r pattern dirsearch for pattern recursively in dir
locate filefind all instances of file
which/apropos appshow possible locations of app
man commandshow manual page for command

Comentários

Translate

Contato

Nome

E-mail *

Mensagem *