IT/Software/Command Line: Difference between revisions
Walttheboss (talk | contribs) |
Walttheboss (talk | contribs) No edit summary |
||
Line 46: | Line 46: | ||
<code>sudo mount -o loop Win10_2004_English_x64.iso /mnt/iso </code><br /> | <code>sudo mount -o loop Win10_2004_English_x64.iso /mnt/iso </code><br /> | ||
=== Symlinks === | ===Symlinks=== | ||
This allows you to click on a folder or directory and actually end up somewhere else. | This allows you to click on a folder or directory and actually end up somewhere else. | ||
For example if a user can't figure out how to get to the Documents folder from Dolphin. | For example if a user can't figure out how to get to the Documents folder from Dolphin.<br /><code>ln -s /real/file/or/folder/path /path/to/link</code> | ||
The link can't already exist. | |||
the path can be a file or directory. | |||
<br /> | <br /> | ||
==More modifiers== | ==More modifiers== | ||
__FORCETOC__ | __FORCETOC__ |
Revision as of 06:01, 3 September 2020
Welcome to the dark world where most IT people live
- This is a gui free world
- If you don't know what a gui is please quietly close the page and go buy a slurpee
- If you don't know what a slurpee is we feel sorry for you.
Basic Commands
Changing Ownership
There are many ways to do this. Half of them may be more clever.
sudo chown walt:walt /path/to/filename
This will make the file filename belong to the user walt and the group walt. Usually we change the group and user at the same time.
OR
sudo chown user:group /path/to/directory/
This changes only the directory to user and group specified
Adding the -R flag after the chown will recurse into directories and files.
sudo chown -R . . .
- We are not sure why the capital r is needed in some cases. But it is here.
Changing Permissions
This is very similar except we use chmod instead of chown
sudo chmod 644 /path/to/file or path/to/directory/
Adding the -R flag does the same as above.
Change all files recursively to 644
find /var/www/html/moodlecnx/ -type f -exec chmod 644 {} \;
Change all directories recursively to 755
find /var/www/html/moodlecnx/ -type d -exec chmod 755 {} \;
Mount and Unmount
iso files
sudo mkdir /mnt/iso
sudo mount -o loop Win10_2004_English_x64.iso /mnt/iso
Symlinks
This allows you to click on a folder or directory and actually end up somewhere else.
For example if a user can't figure out how to get to the Documents folder from Dolphin.ln -s /real/file/or/folder/path /path/to/link
The link can't already exist.
the path can be a file or directory.