you entered in one of the previous steps. Next, you can proceed to identify the open file and its type:
file — definition of the file type (text document, image, folder).
There are commands available that will help you connect a flash drive to the system or, on the contrary, disconnect it:
mount/umount — connect/disconnect disks.
To view the contents of subfolders, use the parameter:
ls [specific_folder_address]
The travel path between folders is tracked using a combination of hot keys:
cd + space + press Tab twice.
To find differences between files, use diff. The command displays the difference in the contents of the documents.
To create a new folder, use the command mkdir, for a file — touch. Other useful commands for managing folders. Copying files and folders is handled by cp, moving/renaming — mv, deleting — rm.
Commands for managing file and directory permissions
To perform some actions, the system administrator needs root access. To obtain superuser rights, enter the command sudo. When such a user assigns several commands at once, the parameter is set for their sequential execution sudo su. After entering it, you can specify commands. If you need to perform a task that was entered earlier, use sudo!! Graphic utilities on behalf of the superuser are launched through a command in the format
sudo gksudo [название приложения, которое нужно запустить].
The superuser can set up file viewing and editing rights for other users. To set file access rights, the command is executed chmod. Depending on the type of rights being set, the options in the command may change. In general, setting up file access will look like this:
chmod опции права /[путь_к_файлу].
There are three main types of rights:
r — reading;
w — record;
x — execution.
And three types of users:
u — file owner;
g — file group;
o — other users.
In addition to the letter description of the option, there is a digital designation of rights:
0 - prohibit access to files;
1 - execution;
2 - record;
3 - execution and recording;
4 - read only;
5 - reading and execution;
6 - reading and writing;
7 - full rights.
Commands for managing users
Linux allows you to create multiple users with different levels of rights. Basic commands for managing users:
useradd userName / passwd userName — creating a user and new zealand whatsapp number database setting parameters for its authentication (password).
userdel userName - delete an account.
usermod userName - edit account.
groupadd group_name — create a group of users with the same rights.
groupdel group_name — delete a group.
Network management commands
Network management commands allow you to find out the domain name, IP address of the server, view information about network settings, test its operation and get information about traffic. These include:
hostname - domain definition / DNS output. Adding the -i option will output the computer's IP address.
To view current network settings:
ip -a — information about settings.
To test the data transfer speed, use ping:
ping google.com.
Cancel commands with hotkeys Ctrl + C.
When you need to measure the number of visits, enter the command:
The answer will be the name of the folder
-
- Posts: 345
- Joined: Tue Jan 07, 2025 4:28 am