Linux_commands_cheat_sheet
Linux_commands_cheat_sheet
id: used to display user and group information for the current user or a specified username
Ex- id
id username
Install something:
For Debian based system-
Ex- sudo apt-get install package_name –y
-y so you don't have to manually type yes
mv source_file_destination target_destination
Note- you can also create single immutable file with cat command
" more "," less ": View file content one page at a time.
Ex- less file.txt
" head " , " tail ": View the beginning or end of a file.
Ex- tail -n 10 file.txt
Types of Permissions-
Permission Levels
Owner: The user who owns the file.
Group: The group that owns the file.
Others: All other users.
Permissions are displayed as a string of 10 characters. The first character indicates the file type
(e.g., - for a regular file, d for a directory), and the next nine characters represent the permissions
for the owner, group, and others in sets of three.
Ex: -rwxr-xr--
r=4
w=2
x=1
7 (4+2+1) = rwx
6 (4+2) = rw-
5 (4+1) = r-x
Example: Set read, write, and execute permissions for the owner, and read and execute for group
and others on file.txt:
-> Networking
Intermediate Commands