Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to clear the history commands recorded in history in linux environment

Shulou Source: shulou.com Published: 2022-06-02 09:32:45 10月03日 Update

This article introduces the knowledge of "how to clear the historical commands recorded in history in linux environment". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. History

This command allows you to view historical commands that have been used

II. History-c

This command and argument can clear the history historical command record

Check again

The command record is already empty

Remarks: knowledge expansion

This command only deletes the command record of the current user, not that of other users.

In fact, these records are in the current user's home directory. Bash_history similar files, of course, depends on what shell you use.

For example: vim ~ /. Bash_history opens the history command record file under the current user.

Cat or vim ~ / .bash_history to view the contents of the file

This is the end of the content of "how to clear the history command recorded in history in linux environment". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Commands history content files users knowledge environment more practical successful learning next again parameters dilemmas notes actual situation heads of household articles cases Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB Docker Shulou Technology Redmi