Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

> what is $ in Linux Ubuntu?, why every line also have this

views
     
TSk town shit
post Dec 28 2019, 05:10 PM, updated 2 months ago

Casual
***
Junior Member
449 posts

Joined: Jan 2009
I searched for a while in the Internet, but I didn't see the explanation about it.
Can somebody please tell me what is $ used for?

Like the Terminal screen:
CODE
suzy@suzy-MacBookAir:/$


Why every line must begin with $

Second thing, If somebody asked me to run as root, what does he means?

This post has been edited by k town shit: Dec 28 2019, 05:10 PM
KrankZ
post Dec 28 2019, 05:22 PM

Getting Started
**
Junior Member
88 posts

Joined: Nov 2007


no money no code
TSk town shit
post Dec 28 2019, 11:05 PM

Casual
***
Junior Member
449 posts

Joined: Jan 2009
QUOTE(KrankZ @ Dec 28 2019, 04:22 PM)
no money no code
*
Serious please
WongGei
post Dec 28 2019, 11:06 PM

Enthusiast
*****
Senior Member
904 posts

Joined: Dec 2007
From: Kuala Lumpur
Ignore the $
For root user, you have to add 'sudo' at the front of each command. Example 'sudo ls' , 'sudo fdisk -l'
TSk town shit
post Dec 29 2019, 12:31 AM

Casual
***
Junior Member
449 posts

Joined: Jan 2009
QUOTE(WongGei @ Dec 28 2019, 10:06 PM)
Ignore the $
For root user, you have to add 'sudo' at the front of each command. Example 'sudo ls' , 'sudo fdisk -l'
*
How I know I'm a root user?
I have only one user in my machine, I'm the only one who is using it.
Ubuntu is quite Programmer-friendly only , please help icon_question.gif
fat16
post Dec 29 2019, 10:52 AM

Look at all my stars!!
*******
Senior Member
4,543 posts

Joined: Jan 2003
From: West johor


QUOTE(k town shit @ Dec 29 2019, 12:31 AM)
How I know I'm a root user?
I have only one user in my machine, I'm the only one who is using it.
Ubuntu is quite Programmer-friendly only , please help  icon_question.gif
*
CODE
$ whoami
mx
$ sudo su
[sudo] password for mx:
root@mx:/home/mx# whoami
root
root@mx:/home/mx# exit
exit
mx@mx:~

command promp change from $ to #, the color too


syaifau
post Dec 29 2019, 11:00 AM

New Member
*
Newbie
26 posts

Joined: Nov 2011


$ means nothing..

it is just a way for the OS to indicate which type of user account u r running as; admin or normal user account.
So you dont have to type "whoami" just to find out your current privilege.
$ usually used for normal user account
# indicate a root account

This $ and # symbol is set within the ENV profile for user/root account and can be changed to other symbol/anything if preferred.
TSk town shit
post Dec 29 2019, 11:37 AM

Casual
***
Junior Member
449 posts

Joined: Jan 2009
QUOTE(fat16 @ Dec 29 2019, 09:52 AM)
CODE
$ whoami
mx
$ sudo su
[sudo] password for mx:
root@mx:/home/mx# whoami
root
root@mx:/home/mx# exit
exit
mx@mx:~

command promp change from $ to #, the color too
*
Thanks thanks rclxm9.gif

QUOTE(syaifau @ Dec 29 2019, 10:00 AM)
$ means nothing..

it is just a way for the OS to indicate which type of user account u r running as; admin or normal user account.
So you dont have to type "whoami" just to find out your current privilege.
$ usually used for normal user account
# indicate a root account

This $ and # symbol is set within the ENV profile for user/root account and can be changed to other symbol/anything if preferred.
*
Thanks thanks rclxm9.gif

 

Switch to:
| Lo-Fi Version
0.0324sec    4.51    5 queries    GZIP Disabled
Time is now: 24th February 2020 - 01:47 PM