How to change $ to # in Linux

How to change $ to # in Linux

In this system, the # sign represents the root user and the $ sign represents the ordinary user. So how do you make them switch quickly?

1. Turn on the computer system first, then click the launcher.

2. There is software installed in the launcher. Just find the terminal software and click it to start it.

3. Or you can right-click and select Open terminal here, which can also achieve the purpose of quickly opening the terminal.

4. After opening, you will see a $ symbol. Enter su and then enter your administrator password. This time it will become #.

5. If you want to exit #, then enter: exit

At this time, it will recover from # back to $.

6. Of course, for some distributions, you need to set the root password before you can open the switch. If the above method cannot switch, you should first enter: sudo passwd root

After pressing Enter, enter your current user's password, then enter a new password for root. Enter it twice and it's done. Then you can use the above su to switch to the root user.

You may also be interested in:
  • A brief explanation of the meaning of shell variables $#, $@, $0, $1, $2 in Linux
  • The difference between php $_SERVER in Windows and Linux
  • Solve the problem of ssh remote login to linux showing -bash-4.1$
  • Summary of basic usage of $ symbol in Linux

<<:  How to use CocosCreator object pool

>>:  Analysis and Solution of ERROR:2002 Reported When MySQL Starts

Recommend

How to add java startup command to tomcat service

My first server program I'm currently learnin...

vue-table implements adding and deleting

This article example shares the specific code for...

How to use Vue3 mixin

Table of contents 1. How to use mixin? 2. Notes o...

Implementation of vertical centering with unknown height in CSS

This article mainly introduces the implementation...

Summary of essential Docker commands for developers

Table of contents Introduction to Docker Docker e...

Common methods and problems of Docker cleaning

If you use docker for large-scale development but...

Detailed analysis of classic JavaScript recursion case questions

Table of contents What is recursion and how does ...

In-depth explanation of Mysql deadlock viewing and deadlock removal

Preface I encountered a Mysql deadlock problem so...

Implementation of Mysql User Rights Management

1. Introduction to MySQL permissions There are 4 ...

What is a MySQL tablespace?

The topic I want to share with you today is: &quo...

How to automatically number the results of MYSQL query data

Preface In fact, I have never encountered this ki...