Dec 08

Misc Linux (Redhat/CentOS) Commands. User Group Password star wc w who id group

Create user and assign to a group

useradd joseph

usermod jerry -G wheels

usermod --help

 

Check users and Groups listed in related files

cat /etc/passwd
cat /etc/group

Try to install star - standard tar (supports extended attributes for Selinux as well)
yum install star
star

yum is not there. so use rpm to install star

mkdir /mnt
mkdir /mnt/iso-installer
mount /dev/sr0 /mnt/iso-installer/
cd /mnt/iso-installer/
cd Packages/

ls -la

You need to install the depenencies for star before 
rpm -ivh star-1.5.2-13.el7.x86_64.rpm
rpm -ivh star-1.5.2-13.el7.x86_64.rpm
rpm -ivh spax-1.5.2-13.el7.x86_64.rpm
rpm -ivh star-1.5.2-13.el7.x86_64.rpm
man star

tar --help

 

Misc Commands
who
last

 

Word and Line Count for a file
wc
wc /etc/hosts
wc -l /etc/hosts
w

Check the id and group for the current user

id

groups

Skip to toolbar