My useful linux commands that some times I need to use.
Ctrl + A: go to the beginning of lineCtrl + E: go to the end of lineCtrl + F: move forward one characterCtrl + B: move backward one character
ps -aux
ps -aux | grep ${PORT}
sudo kill <PID>
grep -rnw '/path/to/somewhere/' -e 'pattern'
- -r or -R is recursive,
- -n is line number, and
- -w stands for match the whole word.
- -l (lower-case L) can be added to just give the file name of matching files.
find / -type d -name {directory-name}
cat /etc/os-release
https://www.e2enetworks.com/help/knowledge-base/how-to-install-node-js-and-npm-on-centos/
.ssh/config
TCPKeepAlive yes
ServerAliveInterval 30
- 1 - Run
lsblkto list available blocks (volumes) and note the volume size / names - 2 - Run
sudo growpart /dev/volumename 1on the volume you want to resize, in our case it wassudo growpart /dev/xvda 1 - 3 - Run
sudo resize2fs /dev/xvda1to expand file system - 4 - Check new size with
df -hcommand
https://support.amimoto-ami.com/english/self-hosting-accounts/increasing-your-ec2-volume-size
ssh -i "key.pem" server-user@server-ip