# versus $ at terminal start ??

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
Jamayka24
Posts: 60
Joined: Sat Jul 20, 2024 1:20 am
Location: 7 Countries, now Jamaica
Has thanked: 6 times
Been thanked: 1 time

# versus $ at terminal start ??

Post by Jamayka24 »

I see # in my terminal and most commands that I find online
start with $. When I use $ I get error msgs and i've learnt to just
exclude it and start with the default #.
Just curious- what's that about ?

dpupbw64_10.0.7 , i5, 8Gb ram, Save on sda2 (USB partition), no HDD

User avatar
mikewalsh
Moderator
Posts: 6022
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 731 times
Been thanked: 1895 times

Re: # versus $ at terminal start ??

Post by mikewalsh »

@Jamayka24 :-

AFAIK, "#" means "root user", whereas "$" means just "user". For us here in Puppyland, they're generally one & the same because Puppy runs AS root. But although we don't normally use the "user" '$' prompt, it IS possible to enter that mode.

The "spot" user is, I believe, our equivalent to the "just a user" of mainstream distros. In other words, "root" has full admin permissions to do absolutely ANYTHING on the system, whereas "spot" should only be able to access/do stuff within its own directory.

Generally, Puppies don't use the "sudo" permission. They're already "root". Some modern Puppies, however, are beginning to be constructed just LIKE mainstream, multi-user distros........some of our devs - like @dimkr - are advocating Puppies SHOULD be built like this in future, because the conventional Linux distro model has always been the safest & most secure. Plus it will do away with the confusion encountered by noobs already used to mainstream Linux......because it will be exactly the same.

I don't necessarily agree with this. Puppy is a hobbyist distro, and was always intended to be single-user, NOT multi-user. AND "fun". You won't find users of other distros tearing their OS apart and re-building it to suit themselves. In the "mainstream", conventional Linux world, the view is taken, "Oh, I'm not doing such-and-such. It was built that way for a reason. The developers know best; me, I'm just a 'user'..."

But to me, who wants to constantly spend all their time asking their own personal system for permission to do anything..?

Whatever happened to the ultimate customizability of Linux.....always one of its biggest selling-points? The ability to have ultimate control over your own system, instead of being at the mercy of a group of people convinced they know better than you.

I don't blame dimkr one little bit for advocating his position. I think he understands all this stuff - including the possible security implications - way better than the rest of us.

Yes, such mitigations are certainly absolutely proper & correct for any kind of multi-user system. I totally agree with that. But for an individual's single home system..? Mm. I remain to be convinced.

================================

I think it's fair to say that anyone who's used Puppy for any length of time is fully aware of the perceived pitfalls of being the root user all the time. We know we need to be more cautious when we modify anything, because it's all too easy to inadvertently remove some critical part of the system. We also understand that, should we brick our systems through tinkering/customizing/whatever, we have no-one but ourselves to blame....whereas, a mainstream distro won't allow you to do any of this.

If I want to tinker or modify, I create a copy of the Puppy I want to change stuff in. I set it to boot, THEN make all the changes I want to in that copy. If I'm successful, it will become the replacement. If it all goes pear-shaped, no harm, no foul. Just delete it & be done with it.....and chalk it up to experience! :D

Mike. ;)

d-pupp
Posts: 288
Joined: Tue Nov 22, 2022 9:11 pm
Location: Canada
Has thanked: 161 times
Been thanked: 50 times

Re: # versus $ at terminal start ??

Post by d-pupp »

@Jamayka24 mikewalsh is correct. # means you are root and $ means you are a regular user. You can confirm this by typing whoami at the terminal
BTW the # and $ are not part of any commands you don't need to type them. They are just to let you know if you are logging in as root.

Jamayka24
Posts: 60
Joined: Sat Jul 20, 2024 1:20 am
Location: 7 Countries, now Jamaica
Has thanked: 6 times
Been thanked: 1 time

Re: # versus $ at terminal start ??

Post by Jamayka24 »

root vs root.png
root vs root.png (84.23 KiB) Viewed 253 times

a) So there are two roots according to this ? - the / root has the inner workings under it,
whereas the root directory only has user data like my docs, downloads etc, ? Yes ?
And # refers to the / directory, and not to the Root directory ??

Also what is considered " tinker or modify ' versus setup and personalisation ?
ie safe versus dangerous for newbies ?

I have some large flash drives on the way and will make a couple of copies
so if I crash, no problem.

Cheers

dpupbw64_10.0.7 , i5, 8Gb ram, Save on sda2 (USB partition), no HDD

williwaw
Posts: 1863
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 165 times
Been thanked: 339 times

Re: # versus $ at terminal start ??

Post by williwaw »

d-pupp wrote: Mon Sep 09, 2024 6:58 pm

BTW the # and $ are not part of any commands you don't need to type them. They are just to let you know if you are logging in as root.

this, you do not type them.

your question about 2 roots has always been a bit confusing since, well before linux

the lower root in the diagram /root is the root users home directory, a noun

the top level "root" is more of an adjective to describe the top level of the filesystem

dimkr
Posts: 2314
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 49 times
Been thanked: 1119 times

Re: # versus $ at terminal start ??

Post by dimkr »

mikewalsh wrote: Mon Sep 09, 2024 6:39 pm

Generally, Puppies don't use the "sudo" permission. They're already "root". Some modern Puppies, however, are beginning to be constructed just LIKE mainstream, multi-user distros........some of our devs - like @dimkr - are advocating Puppies SHOULD be built like this in future

You're misrepresenting my views.

I want Puppy to have:

  • A working package manager, unlike PPM, which is unmaintained for years and very problematic

  • A file system layout similar to major distros (the /usr symlinks) to make third-party applications are more likely to work on it without any special tricks

  • Better security: security updates, a fully automated build system that works without any prebuilt binaries of unknown origni, and more critical processes that run as an unprivileged user with sandboxing

However, I'm not advocating for making Puppy a multi-user distro and removing the "logged in as root" thing.

Regarding the prompt - many users who come to Puppy or Linux newbies that chose Puppy and see # in the prompt get confused when the tutorials they use show $. Some even think it's part of the command to run. This happens because Puppy is the only distro where you're logged in as root. Although it's 'incorrect' and potentially misleading to show $ in Puppy, I still think it's a good idea for the sake of familiarity. Therefore, in Vanilla Dpup, the default prompt says $.

User avatar
rockedge
Site Admin
Posts: 6353
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2538 times
Been thanked: 2514 times
Contact:

Re: # versus $ at terminal start ??

Post by rockedge »

Why can't anyone just say what it is?

The "#" or "$" or any other symbol someone might CONFIGURE to use as the COMMAND LINE PROMPT.

That's what those are.....command line prompts that let a user know the computer is waiting for a command in a console.

You also misrepresented the company I work for: we're not advisors, we fix and automate. I think that mentioning me and details about me was off-topic.

A man of mystery. My car mechanic fix's and automates. :thumbup2:

dimkr
Posts: 2314
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 49 times
Been thanked: 1119 times

Re: # versus $ at terminal start ??

Post by dimkr »

rockedge wrote: Tue Sep 10, 2024 2:54 pm

A man of mystery. My car mechanic fix's and automates. :thumbup2:

I bet he doesn't have a tool that continuously scans millions of cars all over the world for potential problems, presents him with a view of common ones, offers magic buttons that fix them remotely and shows a nice progress bar :)

d-pupp
Posts: 288
Joined: Tue Nov 22, 2022 9:11 pm
Location: Canada
Has thanked: 161 times
Been thanked: 50 times

Re: # versus $ at terminal start ??

Post by d-pupp »

this, you do not type them.

your question about 2 roots has always been a bit confusing since, well before linux

the lower root in the diagram /root is the root users home directory, a noun

the top level "root" is more of an adjective to describe the top level of the filesystem

@williwaw That is correct. You do not type the # or the $. They are just a prompt that lets you know the terminal is ready for you to type a command

I can see where / the root of the file system and /root the root users home directory can be confusing. 8-)

User avatar
mikewalsh
Moderator
Posts: 6022
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 731 times
Been thanked: 1895 times

Re: # versus $ at terminal start ??

Post by mikewalsh »

@dimkr :-

No worries. If you wish to remain anonymous, I'm good with that. I appreciate that not everyone wants to be chatty about themselves online. It's perhaps one of MY biggest failings..! :D

And apologies for any misrepresentation, my friend. No harm was intended. Not intentionally, anyway.

Mike. Image

User avatar
rockedge
Site Admin
Posts: 6353
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2538 times
Been thanked: 2514 times
Contact:

Re: # versus $ at terminal start ??

Post by rockedge »

offers magic buttons that fix them remotely and shows a nice progress bar

I wish!

Hear that Tesla's update software while the car is in the driveway. :geek:

Post Reply

Return to “Beginners Help”