My useful linux commands that some times I need to use.
Ctrl + A: go to the beginning of line
Ctrl + E: go to the end of line
Ctrl + F: move forward one character
Ctrl + 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
lsblk
to list available blocks (volumes) and note the volume size / names - 2 - Run
sudo growpart /dev/volumename 1
on the volume you want to resize, in our case it wassudo growpart /dev/xvda 1
- 3 - Run
sudo resize2fs /dev/xvda1
to expand file system - 4 - Check new size with
df -h
command
https://support.amimoto-ami.com/english/self-hosting-accounts/increasing-your-ec2-volume-size
ssh -i "key.pem" server-user@server-ip