Thursday, June 21, 2018

5 Important Command for Hardisk Partition & Disk Space Check-Linux



5 Commands for check Harddisk Partition & Disk Space.

1. fdisk

Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type.
(If you are working in root user #, then no need to add sudo command)

2. sfdisk


Sfdisk is another utility with a purpose similar to fdisk, but with more features. It can display the size of each partition in MB.

3. cfdisk

Cfdisk is a linux partition editor with an interactive user interface based on ncurses. It can be used to list out the existing partitions as well as create or modify them.

4. parted

Parted is yet another command line utility to list out partitions and modify them if needed.
Here is an example that lists out the partition details.

5. df

Df is not a partitioning utility, but prints out details about only mounted file systems. The list generated by df even includes file systems that are not real disk partitions.

Thursday, June 14, 2018

Remote Desktop Sharing Using xRDP (In Cento 7 / RHEL7)



xrdp is an Open Source Remote desktop Protocol server, which allows you to RDP to your Linux server from Windows machine. 
For this practical need to install three rpm files-epel, nux and xrdp.

Steps…
Step1-Install EPEL and nux repository rpms

Open terminal and install epel and nux rpms using rpm utility.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
 

Step2-xRDP Service Installation

rpm –ivh https://li.nux.ro/download/nux/dextop/el7/x86_64/xrdp-0.6.1-3.el7.nux.x86_64.rpm

Once xrdp is installed, enable then start the xrdp service using the following command.
systemctl enable xrdp

systemctl start xrdp

Step3-Firewall
Configure the firewall to allow RDP connection from external machines. (For open xrdp port-3389)
Firewall-cmd --permanent --add-port=3389/tcp
Firewall-cmd --reload
Step4-Configure SELinux
Configure SELinux
chcon --type=bin_t /usr/sbin/xrdp
chcon --type=bin_t /usr/sbin/xrdp-sesman
Test xrdp Remote Connectivity

Now take RDP from any windows machine using Remote Desktop Connection.
 Enter the ip address of Linux server in the computer field and then click on connect.
Use your Linux user and password for login credentials.

Click on ok.

Thanks!!!!!!!!!!!!!!!






Friday, May 11, 2018

Installation of CentOS 7 Dual Boot with Windows 7

CentOS 7 Dual Boot with Windows 7

Step-1 Install Windows 7 and Make some Free space for Linux Installation.

 Remark: As I remain free unallocated 25 GB space coz Linux not support NTFS File system.


Step-2 Install CentOS7 below screen showing and Windows 7 Not showing. So We need to Update few Entries for Windows 7 in "GRUB2.CFG file.

Step3-For Dual boot first Check Partition Using Fdisk -l command.


Here harddisk showing /dev/sda  means One Harddisk is installed
/dev/sda1  * showing Windows Boot partition with NTFS File System.
/dev/sda5     showing Linux Installation partition.

You Can also see partition details using cfdisk command in details

Step4 For Update Grub.cfg file

Open Terminal in Administrative mode using su command.

Step5:Open grub.cfg file using vi editor


Step6: Update below mention 5 Line under this line (### END /etc/grub.d/10_linux ###)

####### Windows 7 ########
 menuentry "Windows 7"  {
   set root='(hd0,1)'
  chainloader +1
}


Remark: hd0-If windows install in 1st Harddisk and 1 for Windows boot partition.


Step7:At last Save grub.cfg file by using :wq!


Step8:Now Restart your Linux and check your Boot Menu.

Thanks


Saturday, March 24, 2018

Application Installation using RPM Utility



RPM (Red Hat Package Manager) is an default open source and most popular package management utility for Red Hat based systems like (RHELCentOS and Fedora).
The tool allows system administrators and users to installupdateuninstallqueryverify and manage system software packages in Unix/Linux operating systems.
This utility only works with packages that built on .rpm format.
Install an RPM Package
For installing an rpm software package, use the following command with -i option.
#rpm –ivh PackageName
RPM command and options
-i: install a package
-v: verbose for a nicer display
-h: print hash marks as the package archive is unpacked.

For example, to install an rpm package called pidgin-2.7.9-5.el6.2.i686.rpm


Remove a RPM Package.

To un-install an RPM package,  use -e (erase) option.
#rpm -e PackageName
for package name nx-3.5.0-2.el6.centos.i686.rpm.
[root@Packages] rpm -e nx-3.5.0-2.el6.centos.i686.rpm




Saturday, March 10, 2018

Change Network Configuration in Graphical Mode



If we are using RHEL/CentOS with GUI then we can easily configure IP address graphically.

goto Applications-> System Tools-> Settings

click on the settings icon (on bottom right corner.)

configuring ip address 
configuring ip addressAfter the IP information has been edited, click on apply & exit from the menu.


At last restart Network services
[root@hostname~]# service network restart

To verify the IP address issue the following command,
[root@hostname~]# ifconfig


Other GUI method-can use nmtui tool for change IP Address in GUI mode.

Change Hostname in GUI Mode


nmtui tool

NetworkManager tool is used to set the static hostname in /etc/hostname file.

Except this also can change Network configuration details in GUI mode.

Set Hostname

  • Open terminal
  • Type nmtui command
  • select "Set system Hostname"
  •  

  • Type Hostname & click on ok

  • Restart the hostnamed to force the hostnamectl for change permanent hostname.
  • For verify Hostname type command hostname.


 


 

Wednesday, February 21, 2018

Reset Root User Password in CentOS Linux

Steps

Step1 – In the boot grub menu select option to edit.
Selection_003

 Step2-Select Option to edit (e).
Selection_005

Step3-Go to the line of Linux16 and change ro with rw init=/sysroot/bin/sh.

Selection_006

Step4-Now press Control+x to start on single user mode.
Selection_007

Step5-Now access the system with this command. Type

#chroot /sysroot

Step6-Reset the password by typing command

#passwd root

Step7-Update selinux information

#touch /.autorelabel

Step8-Exit from chroot type
#exit
Step9-Reboot the system
#reboot

Done.

Sunday, February 4, 2018

Linux CentOS Step by Step Installation

Step 1Boot from bootable DVD or Pendrive & select Install CentOS 7


01.first_screen

On our next step just press ENTER to begin the installation process.
Press ENTER to start the CentOS 7 Installation

Step 2-Choose Installation Language.
installation language

Step3- Installation Summery

You should now see a screen with title Installation Summary. Actually this window has all the options that user can configure.
03.installation_summary_page_1
There are three main categories −
  • Localization
  • Software selection
  • System this will see one by one:
  •  

    Localization-This setting option Data & Time, Keyboard & Language support setting.

  • Software Selecion-This category has options that deal with software being installed.
     If Select Minimal Install-Linux install in CLI Mode.
    GNOME or Other GUI mode installation.
  • 08.software_selection


Components of Linux System

inux Operating System has primarily three components
  • Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. Kernel provides the required abstraction to hide low level hardware details to system or application programs.
  • System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implement most of the functionalities of the operating system and do not requires kernel module's code access rights.
  • System Utility − System Utility programs are responsible to do specialized, individual level tasks.

Basics Of Linux OS

Linux is one of popular operating system based on Unix. 
It is open source as its source code is freely available.
It was developed by Linus Torvald in 1991 when he was an student at Hensilky University.
Available on CUI & GUI mode.


Different Flavours of Linux
Linux comes in many different guises. The basic system is the same, but the look and feel and the subsystems around it are different. Each version is produced by a different organisation with it's own ethos and aims. 

  • Redhat 
  • Ubunntu
  • Fedora
  • Linux Mint
  • Suse
  • Debian
  • Caldera
  • Mandriva
  • CentOS
  • Gentoo