The Linux terminal It is a powerful tool from which we can do whatever we want; in the following article, I am going to introduce you to this tool, explaining to the newest the main commands to defend ourselves and move correctly through the different directories of our operating system.
The commands or orders that I show you below, they are the most basic that a user of Linux should know.
Commands for handling files
- cd - change directory, to return to the previous directory we will use cd followed by a space
- ls - list the contents of the current directory
- cp - copy
- chmod - change the permissions of a directory or file
- chown - change the owner of a file or directory
- df - shows us the free space on our disk
- du - shows us the used disk space
- find - helps us to search for a certain file
- gzip - decompress a file in this format
- mkdir - create a new directory for us
- more - show the content of a file
- mount - mount a drive or partition on the file system
- mv - move or rename a file
- rm - delete a file
- rmdir - delete a directory or folder
- tar - to pack or unpack tar files
- umount - to unmount a drive or partition from the filesystem.
Practical exercise: create a new folder on the Desktop, rename it, move it to another directory and delete it
The first thing to do will be to open a new terminal and type ls, with this we will report the content of the directory home:
Then we will type cd Desk to enter the Desktop, and mkdir test to create a folder called test:
Now we will rename it to nueva, for this we will type mv test new:
Now we will move it for example to the Downloads directory, for this we will type new mv / home / pakomola / Downloads:
Now to finish we will delete the directory with the command rmdir new:
How you can check is a very simple process and with it we will go familiarizing with the terminal of our Linux, as well as we will understand, for example, what actually happens when cwe read, copy or move a folder or directory from the comfort of the graphical interface.
More information - Introducing basic commands in the terminal
Excellent tutorial.
Thank you
very good tutorial, but I have a question, any way that the rmdir command lets you delete folders that have content? the other day I had to delete the folders one by one, and it was from a 4 »touch screen and the truth is that it was an ordeal!
rm is not only for deleting files, it also deletes folders with the -r parameter, that is, "rm -r" allows deleting "recursively"
It also applies to the cp command, if what we are going to copy is a folder, we must pass the -r parameter so that it copies recursively
Thanks for your annotations
I did not hear about naa ijo de putaaaa
you are very right ioputa boluo
I loved you guey, these two are very right
what a bitch shit
Hello, Daniel Jimenez, I'm gay, I like guys and they give me hard while they take my hair and eat eggs and swallow everything they throw at me.
k kabrones are we not? hahahahahahaha
eat my buttonhole hahaha LONG LIVE THE PENIS
this is shit asiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
how can I delete the content of a file from the terminal. with cp I tried what it did was copy and with mv what it did was change its name and place but what I am trying to do is erase the information from a file and keep it in the same place and with the same name.
thanks for the input
Hello