You are not logged in.

#1 2016-06-27 09:24:36

SavinShetty
Member
From: Mumbai - India
Registered: 2016-06-27
Posts: 20
Website

[SOLVED] What the difference between "#" and "$" in a terminal.

I am currently using arch from past 4-5 months and i was saw that other users have "$" while i get
"[root@anonym ~]# "
can anyone please explain me the difference.
Thankyou.

Last edited by SavinShetty (2016-06-27 09:46:57)


Into a learning curve.

Offline

#2 2016-06-27 09:28:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

You are doing it wrong. '#' is the root prompt, '$' is for regular users.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-06-27 09:33:13

SavinShetty
Member
From: Mumbai - India
Registered: 2016-06-27
Posts: 20
Website

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

jasonwryan wrote:

You are doing it wrong. '#' is the root prompt, '$' is for regular users.

Yes jason i normally access using the root account, so "#" seems perfect right?


Into a learning curve.

Offline

#4 2016-06-27 09:40:27

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

SavinShetty wrote:

Yes jason i normally access using the root account, so "#" seems perfect right?

Most forumers will tell you that it is not right to normally use the root account. But it is your system, you decide.

I would definitively think that as a bad thing for a server. For a normal Desktop computer, the most important and confidential files are usually yours in your home directory while the system files are not confidential at all and relatively easy to reinstall. So the fact that is a huge security risk is relatively unconvincing for me.

Last edited by olive (2016-06-27 09:44:33)

Offline

#5 2016-06-27 09:44:17

SavinShetty
Member
From: Mumbai - India
Registered: 2016-06-27
Posts: 20
Website

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

olive wrote:
SavinShetty wrote:

Yes jason i normally access using the root account, so "#" seems perfect right?

Most forumers will tell you that it is not right to normally use the root account. But it is your system, you decide.

I would definitively think that as a bad thing for a server. For a normal Desktop computer, the more important and confidential files are usually yours in yours home directory while the system files are not confidential at all and relatively easy to reinstall.

Thanks olive, as arch is rolling update system i normally prefer logging in through root user and then for normal stuffs use the alternate accounts. And thanks again for solving my confusion, i will now mark the post as solved.


Into a learning curve.

Offline

#6 2016-06-27 09:47:23

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

SavinShetty wrote:

Thanks olive, as arch is rolling update system i normally prefer logging in through root user and then for normal stuffs use the alternate accounts. And thanks again for solving my confusion, i will now mark the post as solved.

I think you are influenced by Windows here. Of course you do what you want in your system but in Unix/Linux the proper way is to only login as a normal user and become root when you need it via su or sudo (or the graphical gksu, gksudo, etc.).

Offline

#7 2016-06-27 15:32:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,784

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

olive wrote:

Of course you do what you want in your system but in Unix/Linux the proper way is to only login as a normal user and become root when you need it via su or sudo (or the graphical gksu, gksudo, etc.).

I cannot tell you how many times *not* being logged in as root as kept me from doing something really stupid.   I know you are a new user and that this root vs user stuff is a bit unclear.  But trust me, don't log in as root.  For one thing, you will find it impossible (well difficult) to install things from the AUR.   Also, I, and many others, am/are not going to be willing or able to assist with problems that arise from running primarily as root.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2016-06-27 16:46:20

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

ewaller wrote:

I cannot tell you how many times *not* being logged in as root as kept me from doing something really stupid.   I know you are a new user and that this root vs user stuff is a bit unclear.  But trust me, don't log in as root.  For one thing, you will find it impossible (well difficult) to install things from the AUR.   Also, I, and many others, am/are not going to be willing or able to assist with problems that arise from running primarily as root.

I am not a new user. I run "half as root" (I log as a normal user but I can sudo with no password). I respectfully disagree with you. The MOST dangerous things don't need root access. Imagine you have a rogue malware on your machine, what is the most embarrassing/dangerous things it can do:

1) Post very embarrassing email as yourself: might need to hack a few things but definitively no need to have root access
2) Destroy your personal files: no need to have root access.
3) Reading many password and possibly your credit card number. These are probably cached by your browser. If there are not encrypted, there are easily available without being root. Otherwise, I think it is possible (but might be difficult) to somehow hijack the browser. No need to have root access.
4) Erase your system and possibly make it unbootable: need root access.

What's the most embarrassing point? See yourself.

Now let's look at a possible stupidity you can do.
1) Destroy all your personal documents, possibly years of work. No need to have root access
2) Destroy system files and make your system unbootable: Need root access. Embarrassing but you can reinstall.

I think the most important thing is to have backup. Much more important than this root thing. Moreover I do think that Archlinux is about freedom, freedom of running our system the way we want. That's the Arch way. Not willing to help a user that do not use his system the way we want does not fit in this model.

Offline

#9 2016-06-27 17:04:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,784

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

Okay, it is your system.  Regardless, makepkg will refuse to run as root.
I agree on the backup.
As we are all volunteers, we have the freedom of helping when so moved.  If one chooses not to chase a problem down a rabbit hole, we are free not to.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2016-06-27 18:50:50

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

olive wrote:

Imagine you have a rogue malware on your machine...

Can rogue malware install and run on your computer if you are logged in as a non-root user?

...I like this discussion. There are benefits and drawbacks to both sides. smile

Offline

#11 2016-06-27 18:55:44

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

olive wrote:

The MOST dangerous things don't need root access.

LOL, congrats on attemping to reason yourself out of the principle of least privilege. It was entertaining.

Offline

#12 2016-06-27 19:10:42

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

brebs wrote:

LOL, congrats on attemping to reason yourself out of the principle of least privilege. It was entertaining.

And you think that you respect it in a normal use when you run as a user? I suppose that when you run something it can access what it needs and only what it needs. Surely your browser don't need to access your personal documents or photos stored on your hard disk. How have you configured your permissions to prevent it? Archlinux don't even ship SElinux by default.

Can you explain me how the distinction root/normal user respect this principle in a single user Desktop environment? The usual UNIX model is designated with a multi user environment when you want to isolate the various users. In a single user Desktop environment all the damage can be done as yourself. Claiming that the system must be hyper protected while your files containing much more valuable and sensitive information are accessible surely respect this principle...

Last edited by olive (2016-06-27 19:13:34)

Offline

#13 2016-06-27 19:37:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,784

Re: [SOLVED] What the difference between "#" and "$" in a terminal.

Closing this thread before it devolves further.  Not moving to TGN as the OP considers it solved.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB