Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of Linux's unset command

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail "what is the use of Linux's unset command", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what is the use of Linux's unset command" can help you solve your doubts, following the editor's train of thought slowly in depth, let's learn new knowledge.

Linux commonly used commands unset commands are used to delete variables or functions. Unset is a built-in instruction for shell, which can delete variables or functions.

Syntax unset [- fv] [variable or function name]

Parameters:

-f only deletes the function. -v deletes only variables. Example

Delete environment variabl

[root@runoob.com ~] # lx= "ls-lh" / / set the environment variable [root@runoob.com] # $lx / / Total usage of environment variables 116K Desktop-rw-r--r---1 root root 2.1K 2008-03-30 anaconda-ks.cfgdrwx- 3 root root 4.0K March 30 21:22 Desktop-rw-r--r-- 1 root root 50K 2008-03-30 install.log-rw-r--r-- 1 root root 32K 2008-03-30 install.log.sysloglrwxrwxrwx 1 root root 9 2008-03-30 qte-> / opt/qte/ [root@runoob.com ~] # set / / View the current environment variable BASH=/bin/bashBASH_ARGC= () BASH_ARGV= (). Omit part of the content PROMPT_COMMAND='echo-ne "33] 0 ${USER} @ ${HOSTNAME%%.*}: ${PWD/#$HOME/~} 07 "'PS1=' [ubih W] $' PS2=' > 'PS4='+' PWD=/rootQTDIR=/usr/lib/qt-3.3SHELL=/bin/bashSSH_TTY=/dev/pts/4SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:enSYSFONT=latarcyrheb-sun16TERM=xtermUID=0USER=root_=-lhlx='ls-lh' [root@runoob.com ~] # unset lx / / delete Except for the environment variable [root@runoob.com ~] # set / / shows the current environment variable BASH=/bin/bashBASH_ARGC= () BASH_ARGV= (). Omit part of the content PROMPT_COMMAND='echo-ne "33] 0 ${USER} @ ${HOSTNAME%%.*}: ${PWD/#$HOME/~} 07 "'PS1=' [Ubunh W] $' PS2=' > 'PS4='+' PWD=/rootQTDIR=/usr/lib/qt-3.3SHELL=/bin/bashSSH_TTY=/dev/pts/4SUPPORTED=zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:enSYSFONT=latarcyrheb-sun16TERM=xtermUID=0USER=root_=-lh, this article" what is the use of Linux's unset command "has been introduced. If you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about the articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report