Linux / Shell
Linux / Shell, and Solutions.
Permission denied
: command
://
Solutions:
- sudo : sudo <command>
- : chmod +x script.sh()
- : sudo chown $USER:$USER <file>
- : ls -la <file>
: Linux (rwx), chmod 777
command not found / command
: command
:command PATH
Solutions:
- command
- command: apt install <package> yum install <package>
- PATH: echo $PATH
- : /usr/local/bin/command
- :
: New PATH, ~/.bashrc
Address already in use / EADDRINUSE
:
:
Solutions:
- : lsof -i :8080 ss -tlnp | grep 8080
- : kill <PID> kill -9 <PID>
- : and more TIME_WAIT
:,
No space left on device
:
:
Solutions:
- : df -h
- : du -sh /* | sort -rh | head -10
- : sudo journalctl --vacuum-size=100M
- apt : sudo apt clean
- Docker: docker system prune -a
:, and
ssh: connect to host xxx port 22: Connection timed out
: SSH
:, SSH
Solutions:
- : ping <host>
- : telnet <host> 22 nc -zv <host> 22
- SSH : systemctl status sshd()
- : iptables -L ufw status
- / ACL 22
: SSH keepalive: ~/.ssh/config ServerAliveInterval 60