Linux Commands : 1

Create symlink of file

ln -sf <source file path>/<filename> <destination file path>/<filename>

cat <destination file path>/<filename>

Generate ssh key of user

ssh-keygen -t rsa

cat ~/.ssh/

Password less auth from both server, add ssh keys of each other into authorized keys

vi ~/.ssh/authorized_keys

Switch user

su - <username>

Kill services

kill -9 <process id>

killall -e <process name>

Check apache and mysql is running or not

ps aux | grep httpd

ps aux | grep mysql

Retrieve file using http, https and ftp

wget <http url>

File count in folder
cd <folder path>

ls | wc -l

Check system version

cat /etc/redhat-release



Categories: Linux