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!!!!!!!!!!!!!!!