# Terminal commands Below is a list of several GNU/Linux terminal commands and their explanations: * whoami = checks which user is currently logged into the terminal * mutt = opens the mutt email client * ls = lists files and folders in a directory * amfora willthekid.smol.pub = opens gemini://willthekid.smol.pub using the amfora terminal client * pwsh = launches PowerShell * gcc prova.c -o hello = compiles the C source file "prova.c" using the GNU C compiler, naming the output executable "hello" * pwd = displays the current working directory * bombadillo gopher://smol.pub/1/willthekid = opens gopher://smol.pub/1/willthekid using Bombadillo * w3m willthekid.altervista.org = opens the web page willthekid.altervista.org using the w3m terminal browser * lynx willthekid.altervista.org = opens the web page willthekid.altervista.org using the lynx terminal browser * lynx gopher://smol.pub/1/willthekid = lynx can also be used to open Gopher pages, as shown here * bombadillo gemini://willthekid.smol.pub = uses Bombadillo to open a Gemini page * clear = clears the terminal screen * exit = exits the terminal session * cd public_gemini = changes directory to "public_gemini" * vi indice.gmi = opens the file indice.gmi in the vi text editor (creates it if it doesn't exist) * cat indice.gmi = prints the contents of indice.gmi to the terminal * mv index.gmi index01.gmi = renames index.gmi to index01.gmi * cd .. = moves up one directory level * mv prova.c ~ = moves prova.c to your home directory * mkdir tutorial = creates a directory named "tutorial" * mv ciao.md prova.c tutorial = moves ciao.md and prova.c into the tutorial directory * cp index.html ~ = copies index.html to your home directory * ls -al = lists all files and directories (including hidden ones) with detailed properties * cd = changes directory to your home folder * ls -l = lists files and directories with detailed properties (excluding hidden ones) * which php = shows the location of the PHP interpreter (returns to command prompt if not found) * vi hello.go = opens hello.go in vi editor (creates it if it doesn't exist) * go build -o ciao hello.go = compiles hello.go using Go compiler and names the output "ciao" * ./ciao = executes the program named "ciao" * irb = opens the interactive Ruby interpreter (IRB) * which irb = displays the file path of the IRB interpreter * ls -l /usr/bin = shows detailed properties of the bin directory located in /usr * tree = displays directories, subdirectories, and files in a tree structure * clisp = launches the CLISP interpreter * gnatmake -o ciuspolo hello.adb = compiles the Ada source file hello.adb to produce an executable named "ciuspolo" * ./ciuspolo = runs the "ciuspolo" executable * rm hello.ali hello.o ciuspolo = removes the files hello.ali, hello.o, and ciuspolo * mv prova.c hello.c = renames prova.c to hello.c * rm -r ada = recursively removes the "ada" directory and all its contents * file comandi_utili = inspects and displays the file type/properties of comandi_utili * chmod +x smolpub = grants execution permissions to the file smolpub * cp ~/smolpub/hack01 ~/public_gemini = copies hack01 from ~/smolpub to ~/public_gemini * cd ~/public_gemini = directly navigates to ~/public_gemini directory * cp .bash_history history.txt = copies .bash_history to a new file named history.txt * chmod 644 rapata.jpeg = sets read/write permission for owner and read-only for others * chmod 644 * = sets read/write for owner and read-only for others on all files in current directory * tar -czvf immagini.tar.gz immagini = creates a compressed tarball (gzip) of the immagini folder named immagini.tar.gz * glow = launches the Glow terminal Markdown reader * tar -xvf glow.tar.gz = extracts the glow.tar.gz archive * mv -f glow ~ = moves the file glow to your home directory, overwriting any existing file with the same name * echo 'export PATH="$HOME/cartella:$PATH"' >> ~/.bashrc = appends a PATH export line to your ~/.bashrc file * source ~/.bashrc = reloads ~/.bashrc without restarting the terminal session to apply changes * jstar proviamo.txt = opens proviamo.txt in the jstar text editor (creates it if missing) * touch prova.md = creates an empty file named prova.md * ls ~ = lists files and folders in your home directory * ls ~/sorgenti = lists contents of the ~/sorgenti folder * ls *.md = lists all files with the .md extension in the current directory