Last active
September 17, 2019 09:17
-
-
Save nebtrx/1e4a161d051ad2f5ae34183456df5373 to your computer and use it in GitHub Desktop.
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
# open/edit the GHC compiler seetings | |
code $(stack ghc -- --print-libdir)/settings | |
# searh process using the port | |
lsof -i tcp:<port> | |
# kill a process | |
sudo kill -9 <pid> | |
# list process | |
ps auxwww | |
# resourcs usages | |
htop | |
# stop ntp | |
sudo service ntp stop | |
#change server time | |
sudo date -s '2016-11-01 04:58:00' | |
# Adding SSH identitites/keys to terminal session | |
ssh-add ~/.ssh/id_rsa | |
# Switching ssh port to 443 | |
sed -i 's/Port 22/Port 443/' /etc/ssh/sshd_config | |
# Restarting ssh | |
systemctl restart ssh | |
# List mounted devices | |
df -h | |
# List file sizes | |
du -h | |
# Monitor the ouput of a command in real time | |
watch <comman> | |
# i.e.: watch df -h | |
# File to add SSH Keys | |
nano ~/.ssh/authorized_keys | |
# List open ports | |
netstat -l | |
# Show current net iface IP | |
ifconfig |grep inet | |
# Nginx | |
# Checking if the config files are okay | |
sudo nginx -t | |
# Cheking the logs of a service | |
sudo journalctl -u <service-name> | |
# Restartin audio devices on a mac | |
sudo kill -9 `ps ax|grep 'coreaudio[a-z]' | awk '{print $1}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment