In the previous article, we have learned about 4 commands.
Linux Commands |
They are as follows:
1. ls
2. pwd
3. cd
4. mkdir
Now let's continue further...
#touch Command: It will create a blank file.
Input: touch 1.txt
output: A blank file of file name 1.txt
Let's create another blank file 2.txt
Again, Input: touch 2.txt
Now, we have 2 blank files
#mv Command: It will move your file or folder in the file or folder you want to move your file.
Syntax: mv filename(you wanna move) folder name(in which you wanna move your file)
Input: mv 1.txt file1
Output: Your file will move inside to file 1
#cp Command: It will copy your file or folder in the file or folder you want to move your file.
Syntax: cp filename(you wanna move) folder name(in which you wanna move your file)
Input: cp 2.txt file1
Now, what's the difference between cp and mv command?
cp: Stands for a copy.
It will save a copy of your file in the given file or folder.
In this scenario, you will have 2 files of the same name.
mv: Stands for the move.
It will permanently move your file.
In this scenario, you will have only one file.
NOW, let's learn a bit about users in Linux.
Primarily, we have 2 types of user's in Linux:
1. Regular User: Regular users are a user who can work on their home directory only and cannot see or manipulate other users' directories.
For Example: In a system, there are 4 users say U1, U2, U3, and U4.
Now, U1 can only work on their home directory that is U1 and cannot see or manipulate the content of U2, U3, and U4. Until it will have permission to see or manipulate the content.
2. Root User: It has full access to the system.
- It can do anything or any work.
- It can see or manipulate any user's directory.
- It is also known as Admin or Super User.
You are user U1. Firstly, you don't have permission to manipulate other users' directories.
But now, you have permission to do anything or you want to control the system without permission. Then, in that case, you will use the "Sudo" Command.
For Example Sudo mkdir filename
sudo cd...
sudo cp filename folder name
sudo mv filename folder name
Now, we have another user which is not primary.
3. Service User: It has its own account when you have a server or working on a server. E.g. apache2
- They have their own work. So don't worry about it.
Quick Recap:
In this article, we have learned about:
1. touch command: It is used to create a blank file.
2. mv command: It is used to move the file from one file or folder to another.
3. cp command: It is used to copy the file from one file or folder to another.
4. Types of Users:
- Regular User: They are a user who can work on their home directory only.
- Root User: They can manipulate any user's directory.
- Service User: They have their own work while working on the server.
#Linux for Absolute Beginners in Hindi
0 Comments
If you have any doubts, let me know