i beginner linux
can't use "sudo" because error : sudo: command not found
and $path :
blockquote /usr/local/bin:/usr/bin:/bin:/opt/bin:/c/programdata/oracle/java/javapath:/c/program files (x86)/intel/icls client:/c/program files/intel/icls client:/c/windows/system32:/c/windows:/c/windows/system32/wbem:/c/windows/system32/windowspowershell/v1.0:/c/program files/intel/intel(r) management engine components/dal:/c/program files/intel/intel(r) management engine components/ipt:/c/program files (x86)/intel/intel(r) management engine components/dal:/c/program files (x86)/intel/intel(r) management engine components/ipt:/d/hex editor/010 editor:/c/program files (x86)/skype/phone:/c/program files (x86)/nvidia corporation/physx/common:/c/program files (x86)/windows kits/8.1/windows performance toolkit:/c/program files/microsoft sql server/110/tools/binn:/c/program files/microsoft sql server/110/dts/binn:/c/program files (x86)/microsoft sql server/110/tools/binn:/c/program files (x86)/microsoft sql server/110/tools/binn/managementstudio:/c/program files (x86)/microsoft visual studio 10.0/common7/ide/privateassemblies:/c/program files (x86)/microsoft sql server/110/dts/binn
what must ?
let's start fighting-off fear problem path related:
if have sudo installed in /usr/bin directory, , can verified by:
$ whereis sudo
sudo: /usr/bin/sudo /etc/sudo.conf /usr/share/man/man8/sudo.8.gz
so path
environment variable correct (for matter) because:
/usr/local/bin:/usr/bin:/bin:.....etc
not agree ironic nature of previous comment.
true sudo
program not installed in system.
if using debian-based linux distribution (such ubuntu, linux mint, debian , many others), issue command:
$ aptitude install sudo
and if using centos or redhat or fedore:
$ yum install sudo
but not suffice, because in order use sudo
, "user"
i.e. simple "user" supposed gain elevated privileges while calling sudo
, not in sudoers
file.
located in:
/etc/sudoers
so, if try issue command preceded sudo
get:
$ sudo "any_command"
..password....
"user" not insudoers
file.
now comes tricky part...
in order change sudoers
file need root privileges
,
have login root or (s)witch (u)ser root with:
$ su - root
...i hope know root password...
and change file with:
$ vi /etc/sudoers
or more fancy visudo
command
(which in systems opens file nano instead of vi)
$ visudo
and after terrifying warning file should not changed
(which true, careful it!)
can ensure there line:
root all=(all:all) all
note: if there line starting root please replace it
more or less means, user root
can run any command
in any host
any user
(running sudo cmd sees root running command you), belonging group
. may not secure thing in world, simplest!
so, your user
, fits generic description of any user belonging group
, able use sudo!
excuse simplistic explanation, assuming new (or relatively new) linux
, tried cover possible.
hope answer meets expectations...
p.s. thing see new users trying linux, please try not disappoint them or scare them off in way. after linux support of community, isn't it?
Comments
Post a Comment