Home > Operation and Maintenance > CentOS > What should I do if a new centos user cannot use the ll command?

What should I do if a new centos user cannot use the ll command?

WBOY
Release: 2022-02-09 10:38:40
Original
4066 people have browsed it

Solution: 1. Use the "vi ~/.bashrc" command to open the file; 2. Add "alias ll='ls -l'" data to the file and save it; 3. Use "source ~/ The ll command can be used after running the .bashrc" command.

What should I do if a new centos user cannot use the ll command?

The operating environment of this article: centos 6.4 system, Dell G3 computer.

What should I do if a new centos user cannot use the ll command?

ll command

ll is not a basic command under Linux, it is actually an alias of ls -l

Ubuntu does not support the command ll by default. You must use ls -l, which is not very convenient to use.

If you want to use this command, you can make the following modifications:

Open ~/.bashrc

Find #alias ll='ls -l', remove the # in front of it That's it. (Close the original terminal to make the command take effect)

In this way, individual users can use the ll command. After switching to the super user, when using the ll command, it prompts that the command cannot be found. That is because you only modified the individual user. configuration, so switching to root and doing the same operation can solve the problem.

Enlightenment: We can add any other command alias by modifying ~/.bashrc.

  • Run "vi ~/.bashrc"

  • Check whether there is "alias ll='ls -l'" in the file Data,

  • If there is, remove the "#" before the data,

  • If there is not, replace "alias ll='ls -l '"Add it and save it,

  • Then run the "source ~/.bashrc" command and you will be successful.

What should I do if a new centos user cannot use the ll command?

What should I do if a new centos user cannot use the ll command?

Recommended tutorial: "centos tutorial"

The above is the detailed content of What should I do if a new centos user cannot use the ll command?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template