Last active
December 12, 2017 10:24
-
-
Save melyo/30598042f1f17b0eeea0080d965fb99e to your computer and use it in GitHub Desktop.
linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initial set up | |
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04 | |
install lamp | |
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04 | |
vhost | |
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 | |
htaccess | |
https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-16-04 | |
create mysql user | |
https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- copy all contents of a folder to another folder | |
cp -a /source/. /dest/ | |
- remove all contents of a folder | |
rm /path/to/directory/* | |
- rename a folder | |
mv folder/name folder/new-name | |
- permissions | |
drwxrwxrwx | |
divided into 4 parts: d - rwx - rwx - rwx | |
1 - d (directory) or - (file) | |
2 - owner permission (read, write and/or execute) | |
3 - group permission | |
4 - world (guest) permission | |
in order to chage permissions | |
chmod -R 777 /directory/or/file | |
read (r) = 4 | |
write (w) = 2 | |
execute (x) = 1 | |
- ownership | |
upon running ll or ls -a | |
-rw-r--r-- 1 bob users 1892 Jul 10 18:30 linux_course_notes.txt | |
- permissions, owner (user), owner (group), date created, filename | |
in order to change owner ship | |
chown -R user:group /directory/or/file | |
extras | |
$USER - detemine the logged user | |
groups user - get user groups | |
usermod -a -G group user - set group to user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install updates | |
apt-get update # Fetches the list of available updates | |
apt-get upgrade # Strictly upgrades the current packages | |
apt-get dist-upgrade # Installs updates (new ones) | |
install drivers | |
apt-get install -y ubuntu-drivers-common | |
clear | |
apt-get autoremove | |
apt-get autoclean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment