Some Basic Linux Command .
Q : How to add group then user in linux . ?
Ans :
1: add group by using command groupadd
2: add a user into the group by command useradd -G . for adding a user in multiple group just seperate user by useradd -G,,
3: now add password to user by command passwd
4: ensure that user has been added to group use command id ,you will see information of user id ,group id .
5: add a existing user to existing group
usermod -a -G
-a option is used for adding user in supplementry group .
6 : adding user to a derive .
useradd -d /directory
-> this will add user to a directory .
Now come to password
use command
password
7: how to install .Net in RHEL 7 .
Ans : https://www.microsoft.com/net/core#redhat
8: how to delete a user
userdel --remove
9: how to stop ftp(21) in linux server .
iptables -A INPUT -p tcp --destination-port 21 -j DROP
10: To check which port are active
netstat -tnlp
11: how to add user and providing sftp permission with particular directory .
a: useradd -d /path
b: ask for password :
passwd
c: now if you want that only owner should have access of folder then change ownership by
mentioned command
chown -R
Ans :
1: add group by using command groupadd
2: add a user into the group by command useradd -G
3: now add password to user by command passwd
4: ensure that user has been added to group use command id
5: add a existing user to existing group
usermod -a -G
-a option is used for adding user in supplementry group .
6 : adding user to a derive .
useradd -d /directory
-> this will add user to a directory .
Now come to password
use command
password
7: how to install .Net in RHEL 7 .
Ans : https://www.microsoft.com/net/core#redhat
8: how to delete a user
userdel --remove
9: how to stop ftp(21) in linux server .
iptables -A INPUT -p tcp --destination-port 21 -j DROP
10: To check which port are active
netstat -tnlp
11: how to add user and providing sftp permission with particular directory .
a: useradd
b: ask for password :
passwd
c: now if you want that only owner should have access of folder then change ownership by
mentioned command
chown -R
Comments
Post a Comment