Oracle Linux/Quick Reference
From r00tedvw.com wiki
(Difference between revisions)
(→Add user & add to sudoers) |
|||
Line 18: | Line 18: | ||
~$ passwd user | ~$ passwd user | ||
add to sudoers | add to sudoers | ||
− | ~$ visudo | + | <nowiki>~$ visudo |
− | + | ... | |
− | + | user ALL=(ALL) ALL</nowiki> | |
+ | or use the wheel group. Uncomment it: | ||
+ | <nowiki>## Allow people in the group wheel to run all commands | ||
+ | %wheel ALL=(ALL) ALL</nowiki> | ||
+ | Add user to the group | ||
+ | <nowiki>~$ sudo usermod -a -G [group] [user] | ||
+ | i.e. sudo usermod -a -G sudo Joe | ||
+ | |||
+ | check to verify they are part of the group | ||
+ | ~$ getent group sudo | ||
+ | sudo:x:27:Bob,Joe</nowiki> | ||
+ | |||
==determine packages installed & search== | ==determine packages installed & search== | ||
~$ rpm -qa | less | grep term | ~$ rpm -qa | less | grep term |
Revision as of 23:48, 12 August 2017
Contents |
yum
update repo cache (agt-get update equivalent)
~$ yum check-update
update all packages
~$ yum update
install software
~$ yum install lynx
search for software
~$ yum search apache
remove software
~$ yum remove lynx
search for package by command
~$ yum whatprovides dig
Add user & add to sudoers
add user
~$ useradd user
set password for user
~$ passwd user
add to sudoers
~$ visudo ... user ALL=(ALL) ALL
or use the wheel group. Uncomment it:
## Allow people in the group wheel to run all commands %wheel ALL=(ALL) ALL
Add user to the group
~$ sudo usermod -a -G [group] [user] i.e. sudo usermod -a -G sudo Joe check to verify they are part of the group ~$ getent group sudo sudo:x:27:Bob,Joe
determine packages installed & search
~$ rpm -qa | less | grep term
netstat
determine gateway
~$ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 10.45.9.1 0.0.0.0 UG 0 0 0 eth0 10.45.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
disable selinux
~$ /etc/selinux/config change SELinux=enforcing to SELinux=disabled
check linux version
~$ rpm -qf /etc/redhat-release
release and renew ip (dhcp)
release
~$ sudo dhclient -v -r eth0
renew
~$ sudo dhclient -v eth0
check and change DNS servers
~$ sudo vi /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4
Install epel repo
~$ yum install epel-release