Posts

Showing posts with the label Linux

Install a Desktop (GUI) on an Ubuntu Server

Step:-1 Update Repositories and Packages sudo apt-get update sudo apt-get upgrade sudo apt-get install tasksel Step:-2 Select a Display Manager sudo apt-get install slim OR sudo apt-get install lightdm Step:-3 Exceute tasksel [Select Desktop package] The system will install the software and reboot,  giving you a graphical login screen generated by your default display manager. Ref: https://phoenixnap.com/kb/how-to-install-a-gui-on-ubuntu

Configure Network bridge and KVM in ubuntu

Step:1 Verify Whether your system support hardware virtualization egrep -c '(vmx|svm)' /proc/cpuinfo 1 If the output is greater than 0 then it means your system supports Virtualization  else reboot your system, then go to BIOS settings and enable VT technology. Now Install “kvm-ok” utility using below command, it is used to determine  if your server is capable of running hardware accelerated KVM virtual machines sudo apt install cpu-checker sudo kvm-ok INFO: /dev/kvm exists KVM acceleration can be used Step:2 Install KVM and its required packages sudo apt update apt install qemu qemu-kvm libvirt-bin  bridge-utils  virt-manager Step:3 Start & enable libvirtd service service libvirtd start update-rc.d libvirtd enable service libvirtd status Step:4 Configure Network Bridge for KVM virtual Machines vi /etc/netplan/50-cloud-init.yaml network:   version: 2   ethernets:     ens33:       dhcp4: no       dhcp6: no   b...

Linux Booting Procedure

 L inux Booting procedure The stages involved in Linux Booting Process are: 1. BIOS 2. Boot Loader     - MBR     - GRUB 3. Kernel 4. Init 5. Runlevel scripts 6. User Interface     STEP 1. BIOS This is the first thing which loads once you power on your machine. When you press the power button of the machine, CPU looks out into ROM for further instruction. The ROM contains JUMP function in the form of instruction which tells the CPU to bring up the BIOS BIOS determine all the list of bootable devices available in the system. Prompts to select bootable device which can be Hard Disk, CD/DVD-ROM, Floppy Drive, USB Flash Memory Stick Etc.. Operating System tries to boot from Hard Disk where the MBR contains primary boot loader.     STEP 2. Boot Loader  To be very brief this phase includes loading of the boot loader (MBR and GRUB/LILO) into memory to bring up the kernel. MBR (Master Boot R...

Fail to ban in UBUNBTU 16.04.4 LTS

#apt-get update #apt-get install fail2ban -y #service fail2ban restart #service fail2ban status   #vi /etc/fail2ban/jail.local [DEFAULT] ignoreip = 127.0.0.1/8 YOUR_PREFERRED_IP/32 ::1 bantime = 3600 findtime = 600 maxretry = 5 [sshd]  enabled = true port = ssh,78 filter = sshd logpath = /var/log/auth.log maxretry = 2   #service fail2ban restart #service fail2ban status #fail2ban-client status #fail2ban-client status sshd   # fail2ban-client set sshd unbanip selected_ip     Ref: https://www.liquidweb.com/kb/install-configure-fail2ban-ubuntu-server-16-04/        

Linux System Monitoring

1.You need to determine which process is monopolizing or eating the CPUs. Following command will displays the top 10 CPU users on the Linux system. # ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10 OR # ps -eo pcpu,pid,user,args | sort -r -k1 | less