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

Detailed explanation of CSS pre-compiled languages ​​and their differences

1. What is As a markup language, CSS has a relati...

Detailed tutorial on running multiple Springboot with Docker

Docker runs multiple Springboot First: Port mappi...

How to design the homepage of Tudou.com

<br />I have been working in front-end for s...

jQuery plugin to achieve image comparison

This article example shares the specific code of ...

Analyze the problem of pulling down the Oracle 11g image configuration in Docker

1. Pull the image docker pull registry.cn-hangzho...

How to use filters to implement monitoring in Zabbix

Recently, when I was working on monitoring equipm...

MySQL trigger usage scenarios and method examples

trigger: Trigger usage scenarios and correspondin...

Classes in TypeScript

Table of contents 1. Overview 2. Define a simple ...

Docker image management common operation code examples

Mirroring is also one of the core components of D...

JavaScript anti-shake case study

principle The principle of anti-shake is: you can...

Detailed deployment of docker+gitlab+gitlab-runner

environment Server: centos7 Client: window Deploy...

Using HTML+CSS to track mouse movement

As users become more privacy-conscious and take m...

Call and execute host docker operations in docker container

First of all, this post is dedicated to Docker no...