Linux commands

for Redhat Linux

  • list all the repositories

Common Linux

  • find current folder size
1
2
findmnt /tmp -o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET
findmnt /var -o AVAIL
  • check current user group
1
2
$ groups username
$ usermod -a -G groupname username
  • check RAM and CPU information
1
cat /proc/cpuinfo

subscription-manager

1
2
3
4
subscription-manager repos --disable '*Hortonworks*'
subscription-manager repos --enable Hortonworks_Ambari_2_5_1_0_RHEL7 --enable Hortonworks_Ambari_2_4_2_0_RHEL7 --enable Hortonworks_HDP-UTILS_1_1_0_21_RHEL7
#check existing package included in certain repo
yum list available | grep Hortonworks_Ambari_2_5_1_0_RHEL7
  • find port 7000 is used by which process
1
# fuser 7000/tcp
Reward Makes Perfect
0%