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

MySQL 8.0.18 installation and configuration method graphic tutorial

This article records the installation and configu...

Vue implements small form validation function

This article example shares the specific code of ...

Sample code for implementing rolling updates of services using Docker Swarm

1. What is Docker Swarm? Docker Swarm is a cluste...

Tutorial on Migrating Projects from MYSQL to MARIADB

Prepare the database (MySQL). If you already have...

JavaScript color viewer

This article example shares the specific code of ...

MySQL date processing function example analysis

This article mainly introduces the example analys...

Sharing of experience on repairing MySQL innodb exceptions

A set of MySQL libraries for testing. The previou...

Why Nginx is better than Apache

Nginx has taken over the majority of the Web serv...

Detailed explanation of Vue life cycle

Table of contents Why understand the life cycle W...

Javascript asynchronous programming: Do you really understand Promise?

Table of contents Preface Basic Usage grammar Err...

HTML input file control limits the type of uploaded files

Add an input file HTML control to the web page: &...

How to solve the problem that the project in eclipse cannot be added to tomcat

1. Right-click the project and select properties ...