Basic Linux commands.
If you're new to Linux or just need to refresh your memory, you're in the right place. In this article, we will provide you with a quick and easy guide to the basic linux commands. Learning these commands will help you efficiently navigate and use the operating system Linux. Whether you want to open a terminal, create files, copy and paste, or even search for information in the system, having basic knowledge of Linux will make your life easier. Let's get started!
Step by step -- Basic Linux commands:
- Basic Linux commands.
- pwd: This command shows the route current. It is useful to check which directory you are in.
- ls: With this command you can list the contents of a directory. When you run it, you will see a list of files and folders in the current location.
- CD: With the "cd" command you can change the directory. For example, if you want to go to the "Documents" folder, simply type "cd Documents" and press Enter.
- mkdir: This command allows you create a new folder. You just have to write "mkdir" followed by the name you want to give to the folder.
- touch: With the "touch" command you can create a new empty file. For example, if you want to create a file called “new.txt,” just type “touch new.txt” and press Enter.
- cp: With this command can you do a copy from a file or folder. For example, if you want to copy the file "documento.txt" into the "Backup" folder, you must type "cp document.txt Backup/".
- mv: With the "mv" command you can move or rename a file or folder. For example, if you want to rename the file "old.txt" to "new.txt," type "mv old.txt new.txt."
- rm: This command is used to delete files or folders. Be careful when using it as deleted files cannot be recovered easily. For example, to delete a file named "file.txt," type "rm file.txt."
- chmod: With the "chmod" command you can change the permissions of a file or folder. For example, if you want to give read, write and execute permissions to a file called "script.sh" for the owner, type "chmod u+rwx script.sh".
- Man: If you need help with a particular command, you can use the "man" command followed by the command name. For example, to get detailed information about command "ls", type "man ls".
FAQ
Basic Linux Commands – Questions and Answers
1. What is Linux?
Linux es an operating system free and open source that is used widely throughout the world.
2. What is the terminal in Linux?
La terminal on Linux is a command line interface that allows users to enter instructions to interact directly with and operating system.
3. How do I open the terminal in Linux?
To open the terminal on Linux, follow these steps:
- Press Ctrl + Alt + T to open the terminal.
- Alternatively, you can search for “terminal” in your applications menu and select the corresponding option.
4. What is the command to view the contents of a folder in Linux?
The command to see the content from a folder on Linux it is ls.
5. How do I change directories in the Linux terminal?
For change directory in the linux terminal, follow these steps:
- Use the command cd followed by the name of the directory you want to access.
- Example: cd my_folder
6. How do I create a new folder in Linux?
For create a new folder on Linux, use the command mkdir.
7. How do I delete a file in Linux?
For delete a file on Linux, use the command rm.
8. How do I copy files on Linux?
For copy files on Linux, follow these steps:
- Use the command cp followed by the name of the file you want to copy and the destination location.
- Example: cp file.txt destination_folder/
9. How do I move files in Linux?
For move files on Linux, follow these steps:
- Use the command mv followed by the name of the file you want to move and the destination location.
- Example: mv file.txt destination_folder/
10. How do I change the permissions of a file in Linux?
For change permissions from a file in Linux, use the command chmod.
You may also be interested in this related content:
- How to make a hard drive partition in Windows 10
- Alternative operating systems for Fire Stick?
- How to install Ubuntu on a separate partition?