Created
January 7, 2014 17:29
-
-
Save dejanmarkovic/8303000 to your computer and use it in GitHub Desktop.
Linux commands
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
nmap | |
---- | |
(scans ports) | |
iptables | |
-------- | |
?? | |
system | |
------ | |
(also command) | |
locate | |
------ | |
(locates files) | |
yum install mlocate | |
NOTEL if there is ans error "locate ca not stat" use updatedb command to build index for search | |
history | |
------- | |
(shows history of command for the curent user) | |
w | |
---- | |
mc (midnight commander) | |
get linux release version | |
------------------------- | |
cat /etc/*release* | |
restart frpm | |
------------- | |
/etc/init.d/php-fpm restart | |
change owner | |
------------ | |
chown owner-user file | |
chown owner-user:owner-group file | |
chown owner-user:owner-group directory | |
chown options owner-user:owner-group file | |
chown -R products:products public_html | |
change persmissions | |
-------------------- | |
chmod -R 0755 directoryNameHere | |
Start apache on boot. | |
-------------------- | |
chkconfig --levels 235 httpd on | |
Start MYSQLD on boot. | |
--------------------- | |
chkconfig --level 2345 mysqld on | |
Troubleshooting | |
--------------- | |
top | |
to catch the culprit | |
-------------------- | |
ps aux | grep php | |
or mysql | |
or httpd (sometimes is named apache) | |
or nginx | |
good comands for handling backups | |
--------------------------------- | |
sleep | |
usleep (netter one) | |
ZIP | |
--- | |
zip -r archivefile.zip papers | |
delete al files | |
--------------- | |
rm -rf * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment