Complete Guide to Linux Commands for Beginners

28 giu 2023 2 min di lettura
Complete Guide to Linux Commands for Beginners
Indice dei contenuti

Introduction

Welcome to the complete guide to Linux commands for beginners! In this tutorial, you will learn basic Linux commands that will be useful in your experience with the Linux operating system.

Using the "cd" command

The "cd" command is used to move between directories in the Linux file system. Here are some examples of use:

cd nome_directory # Sposta nella directory specificata
 cd.. # Sposta nella directory genitore
 cd /percorso/alla/directory # Sposta nella directory assoluta
 cd ~ # Sposta nella directory home dell'utente corrente
 cd - # Sposta nella directory precedente

Using the "ls" command

The "ls" command is used to list the files and directories present in a given directory. Here are some examples of use:

ls # Elenco dei file e delle directory nella directory corrente
 ls -l # Elenco dettagliato dei file e delle directory
 ls -a # Elenco di tutti i file e le directory, compresi quelli nascosti
 ls -lh # Elenco dettagliato dei file e delle directory con dimensioni leggibili dall'uomo

Using the "mkdir" command

The "mkdir" command is used to create new directories in the Linux file system. Here are some examples of use:

mkdir nome_directory # Crea una nuova directory con il nome specificato
 mkdir -p percorso/alla/nuova_directory # Crea una nuova directory con la specifica di un percorso completo

Using the "touch" command

The "touch" command is used to create new files in the Linux file system or to update the date and time of an existing file. Here are some examples of use:

touch nome_file # Crea un nuovo file con il nome specificato
 touch nome_file_estensione # Crea un nuovo file con il nome e l'estensione specificati
 touch -c nome_file # Aggiorna la data e l'ora di un file esistente senza crearne uno nuovo

Using the "cp" Command

The "cp" command is used to copy files and directories in the Linux file system. Here are some examples of use:

cp file_origine file_destinazione # Copia un file nella destinazione specificata
 cp file_origine percorso/alla/destinazione # Copia un file in un percorso completo specificato
 cp -r directory_origine directory_destinazione # Copia una directory nella destinazione specificata, inclusi tutti i suoi contenuti

Using the "rm" command

The "rm" command is used to remove files and directories in the Linux file system. Here are some examples of use:

rm nome_file # Rimuovi un file specificato
 rm -r nome_directory # Rimuovi una directory specificata e tutti i suoi contenuti
 rm -f nome_file # Rimuovi un file specificato senza chiedere conferma

Using the "ps" command

The "ps" command is used to list the processes running in the system. Here are some examples of use:

ps # Elenco dei processi in esecuzione dell'utente corrente
 ps -ef # Elenco dettagliato di tutti i processi in esecuzione nel sistema
 ps -aux # Elenco dettagliato di tutti i processi in esecuzione nel sistema, inclusi quelli di tutti gli utenti

Using the "kill" command

The "kill" command is used to terminate a running process in the system. Here are some examples of use:

kill ID_processo # Termina un processo specificato utilizzando il suo ID
 killall nome_programma # Termina tutti i processi con il nome specificato

Conclusion

In this tutorial, you learned basic Linux commands to get started with the Linux operating system. Remember that there are many more commands available, so keep exploring and experimenting to improve your Linux skills.

Buy me a coffeeBuy me a coffee

Supportaci se ti piacciono i nostri contenuti. Grazie.

Successivamente, completa il checkout per l'accesso completo a Noviello.it.
Bentornato! Accesso eseguito correttamente.
Ti sei abbonato con successo a Noviello.it.
Successo! Il tuo account è completamente attivato, ora hai accesso a tutti i contenuti.
Operazione riuscita. Le tue informazioni di fatturazione sono state aggiornate.
La tua fatturazione non è stata aggiornata.