terminal CLI education needed

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

terminal CLI education needed

Postby Alveolar » Wed Jan 06, 2010 4:35

I have been using kubuntu exclusively for over a year. I just installed the latest gaming version of sabayon (3.9GB) and I began reading the how-to's. I opened up the following link and followed instructions

http://wiki.sabayonlinux.org/index.php? ... t_to_do.3F

So I opened up a terminal that said "[email protected] ~ " I typed in "su" It asked for my password. So I typed it in. I then got "add user #" then I started copying and pasting from the above url and basically nothing happens. So I typed in "help" and I got a help menu. So at least my terminal works even if I can manage to screw-up extremely simple instructions.

I am use to sudo bash-ing then apt-get installing (my background is obviously not computer science so I am floundering in what must seem to be pathetic ignorance)

Clay
Alveolar
Baby Hen
 
Posts: 2
Joined: Wed Jan 06, 2010 3:08

Re: terminal CLI education needed

Postby throdon » Wed Jan 06, 2010 5:36

I know this might sound snide, it is not meant to be. if you want some hands on CLI training start reading about gentoo. I haven't even got X running on it but I learned more about the command line in a week over there than in 2.5 to 3 years on linux. Stay here and Sabayon will teach you a lot, and the forum is quite forgiving. Sabayon is a bad ass stable distro but it is a little unforgiving if you do not read before you execute. so use the forums and read all of our documentation, I truly used some of our documentation on my gentoo install because reading it for 2 years I knew where to find out where my questions could be answered. a good place to start is
http://forum.sabayon.org/viewtopic.php?f=86&t=16505

I am not being a dick here I don't know how to add additional users in Sabayon but it should be the same way as in gentoo
Code: Select all
 passwd
Code: Select all
useradd -m -G users john
Code: Select all
passwd john
Code: Select all
su - john


just change john to what ever user name you want and away you go. one last thing allow someone to confirm this as the syntax might be a little different in sabayon. if gentoo ever gets its claws in you spend ALOT of time reading about it. I spent 2 years reading about it and I am still clueless, but I continue to read everything I can find, Have fun with sabayon it is a great distro.
Troll hunter with an overzealous nature
throdon
Advanced Hen
 
Posts: 229
Joined: Mon Aug 20, 2007 13:06
Location: Central valley, California

Re: terminal CLI education needed

Postby micia » Wed Jan 06, 2010 11:05

This topic might help you a lot, if you are searching for bash basics:
http://forum.sabayon.org/viewtopic.php?f=3&t=17235

I don't remember if there is also the user add procedure, but I think that the
way explained by throdon is excellent, you could also be interested in the
CLI utility superadduser:
Code: Select all
eix superadduser
* app-admin/superadduser
     Available versions:  1.0.9
     Homepage:            http://www.interlude.org.uk/unix/slackware/
     Description:         Interactive adduser script from Slackware



I was working to a wiki page about bash, but lately I have no time at all, so there is only
a little page about it in Italian...
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: terminal CLI education needed

Postby Fitzcarraldo » Wed Jan 06, 2010 11:05

Alveolar wrote:So I opened up a terminal that said "[email protected] ~ " I typed in "su" It asked for my password.

It was not asking for your password, it was asking for the root user's password (analogous to the Administrator's password in Windows).

Code: Select all
[email protected] ~ $ su
Password:  <---- You enter the root user's password here, not user fitzcarraldo's password.
acertm8215 fitzcarraldo # whoami
root
acertm8215 fitzcarraldo # exit
exit
[email protected] ~ $ whoami
fitzcarraldo
[email protected] ~ $


No sudo'ing needed here! Actually sudo is still usable, being a valid Linux command, and you can use it if you want although the usual way is to instead use the 'su' (substitute user') command in a Konsole/Terminal window when you need to do anything as the root user, but to only do that when it's really necessary and to log-out ('exit') once the job is done:

Code: Select all
[email protected] ~ $ whoami
fitzcarraldo
[email protected] ~ $ su
Password:
acertm8215 fitzcarraldo # whoami
root
acertm8215 fitzcarraldo # <system-wide command here>
acertm8215 fitzcarraldo # exit
exit
[email protected] ~ $ whoami
fitzcarraldo
[email protected] ~ $


If you use the command 'su' then the environment variables and home directory remain those of the user who entered the 'su' command. If you use the command 'su -' rather than just 'su' then the environment variables and home directory become those of the root user.

Actually, the 'su' command can be used to switch temporarily to any other user, not just the root user. For example:

Code: Select all
[email protected] ~ $ whoami
fitzcarraldo
[email protected] ~ $ su - herzog
Password:  <--- User fitzcarraldo needs to enter user herzog's password here, or else he won't be given access to user herzog's account.
[email protected] ~ $ whoami
herzog
[email protected] ~ $ exit
logout
[email protected] ~ $ whoami
fitzcarraldo
[email protected] ~ $


A well-written explanation of the 'su' command: The su Command.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7985
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: terminal CLI education needed

Postby Alveolar » Wed Jan 06, 2010 15:48

W O W ! and I mean that. Thank you all so very much for your support. I have a lot of reading and things to attempt. You have pointed me in a good direction. Thank You.
Respectfully,

Clay
Alveolar
Baby Hen
 
Posts: 2
Joined: Wed Jan 06, 2010 3:08


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 1 guest