Friday, April 22, 2016

Useful procedures on Ubuntu

Enable root ssh login on Ubuntu 14.04

edit /etc/ssh/sshd_config to make sure the following:

     PermitRootLogin yes
 
if want to allow password log in, then add the following line as well 
 
     PasswordAuthentication yes
 
for root user, there must be a password generated for root.  
 
Restart the ssh service
 
     service ssh restart 

Change em1 to eth0

sudo apt-get remove biosdevname
sudo update-initramfs -u 
 
on ubuntu 15.10 do the following:
edit /etc/default/grub change
 
   GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0" 
 
run this command:
   grub-mkconfig -o /boot/grub/grub.cfg
 
on ubuntu 16.04 do the following:
edit /etc/default/grub change
 
   GRUB_CMDLINE_LINUX="net.ifnames=0"
run this command: 
 
   grub-mkconfig -o /boot/grub/grub.cfg 
 
reboot the system 

Kill processes in Ubuntu by name

kill $(pgrep someprogram)

killall -v someprogram

pkill someprogram

kill `ps -ef | grep someprogram | grep -v grep | awk ‘{print $2}’`


 

No comments:

Post a Comment