Ib puag ncig hloov pauv: Lawv yog dab tsi?

Cov txheej txheem:

Ib puag ncig hloov pauv: Lawv yog dab tsi?
Ib puag ncig hloov pauv: Lawv yog dab tsi?
Anonim

Ib puag ncig hloov pauv yog qhov muaj txiaj ntsig zoo uas lub operating system thiab lwm yam software siv tau los txiav txim siab cov ntaub ntawv tshwj xeeb rau koj lub computer.

Hauv lwm lo lus, nws yog ib yam uas sawv cev rau lwm yam, xws li qhov chaw hauv koj lub computer, tus lej version, daim ntawv teev cov khoom, thiab lwm yam.

Ib puag ncig hloov pauv tau nyob ib puag ncig los ntawm cov cim feem pua (%), xws li hauv %temp%, kom paub qhov txawv ntawm cov ntawv tsis tu ncua.

Ob hom muaj nyob: tus neeg siv ib puag ncig hloov pauv thiab qhov system ib puag ncig hloov pauv.

User Ib puag ncig Variables

Tus neeg siv ib puag ncig hloov pauv, raws li lub npe qhia, yog qhov hloov pauv ib puag ncig uas tshwj xeeb rau txhua tus neeg siv nyiaj.

Qhov no txhais tau hais tias tus nqi ntawm qhov sib txawv thaum nkag mus rau hauv ib tus neeg siv tuaj yeem sib txawv dua li tus nqi ntawm tib qhov sib txawv thaum nkag mus rau hauv ib tus neeg siv sib txawv ntawm tib lub computer.

Cov hom kev hloov pauv ib puag ncig no tuaj yeem raug teeb tsa los ntawm tus neeg siv twg los xij tau nkag mus, tab sis Windows thiab lwm yam software tuaj yeem teeb tsa lawv ib yam.

Ib qho piv txwv ntawm tus neeg siv ib puag ncig hloov pauv yog %homepath%. Piv txwv li, ntawm ib lub khoos phis tawj Windows 11, qhov sib txawv ntawd tuav tus nqi ntawm Users\Tim, uas yog lub nplaub tshev uas muaj tag nrho cov neeg siv cov ntaub ntawv tshwj xeeb.

Ib tus neeg siv ib puag ncig hloov pauv tuaj yeem yog kev cai, ib yam nkaus. Tus neeg siv tuaj yeem tsim ib yam dab tsi zoo li %data%, uas yuav taw tes rau cov ntawv tais ceev tseg ntawm lub computer xws li C:\Downloads\Files. Ib puag ncig hloov pauv zoo li qhov no tsuas yog ua haujlwm thaum tus neeg siv tshwj xeeb nkag rau hauv.

Koj tuaj yeem siv tus neeg siv kev cai ib puag ncig hloov pauv yog tias koj xav siv shortcuts mus ncig koj lub computer. Los yog, yog tias koj tab tom xav ua ntej thiab tsim ib tsab ntawv uas taw qhia rau ib puag ncig hloov pauv, koj tuaj yeem hloov pauv cov ntawv tais ceev tseg tom qab tsis tas yuav kho tag nrho cov cai hauv tsab ntawv.

System Environment Variables

System ib puag ncig hloov pauv txuas ntxiv dhau ib tus neeg siv, siv rau txhua tus neeg siv uas yuav muaj, lossis tsim yav tom ntej. Feem ntau qhov kev hloov pauv ib puag ncig taw qhia rau qhov chaw tseem ceeb xws li Windows nplaub tshev.

Qee qhov kev hloov pauv ib puag ncig feem ntau hauv Windows systems suav nrog %path%, %programfiles%, % temp%, thiab %systemroot%, txawm tias muaj ntau lwm tus.

Piv txwv li, thaum koj nruab Windows, %windir% yog teem rau cov npe uas nws tau teeb tsa rau. Txij li thaum lub installation directory yog ib yam ntawm cov installer (uas yog koj … lossis koj lub computer tsim) tuaj yeem txhais hauv ib lub khoos phis tawj, nws yuav yog C:\Windows, tab sis lwm qhov, nws yuav yogC:\Win10

Txuas ntxiv nrog rau qhov piv txwv no, cia peb hais tias Microsoft Word tau teeb tsa ntawm txhua lub khoos phis tawj no tom qab Windows ua tiav. Raws li ib feem ntawm Word installation txheej txheem, ib tug xov tooj ntawm cov ntaub ntawv yuav tsum tau muab theej rau lub directory uas lub qhov rais ntsia tau rau hauv. Yuav ua li cas lo lus kom paub tseeb tias nws yog txhim kho cov ntaub ntawv nyob rau hauv qhov chaw yog tias qhov chaw yog C:\ Windows ntawm ib lub computer thiab lwm qhov ntawm lwm qhov?

Txhawm rau tiv thaiv qhov teeb meem zoo li no, Microsoft Word, nrog rau feem ntau software, tau tsim los rau nruab rau %windir%, tsis yog ib qho tshwj xeeb. Txoj kev no, nws tuaj yeem paub tseeb tias cov ntaub ntawv tseem ceeb no tau teeb tsa hauv tib lub npe raws li Windows, txawm tias qhov twg yuav yog.

Saib Microsoft's Recognized Environment Variables nplooj ntawv rau cov npe loj ntawm cov neeg siv thiab qhov system ib puag ncig hloov pauv feem ntau siv hauv Windows.

Yuav Ua Li Cas Pom Tus Nqi Ntawm Ib Cheeb Tsam Hloov Pauv

Muaj ntau txoj hauv kev los saib seb qhov chaw ib puag ncig hloov pauv tau tshwm sim li cas.

Command Prompt Echo Command

Feem ntau, tsawg kawg hauv Windows, qhov yooj yim tshaj plaws, thiab tej zaum nrawm tshaj plaws, txoj hauv kev ua qhov no yog los ntawm qhov yooj yim Command Prompt hais kom ua hu ua echo.

Qhib Command Prompt thiab ua raws li cov lus txib hauv qab no raws nraim, tau kawg, hloov pauv %temp% rau ib puag ncig hloov pauv koj xav tau:


echo %temp%

Nco tus nqi uas tau tshwm sim tam sim hauv qab. Piv txwv li, echo %temp% tuaj yeem tsim qhov no:


C:\Users\Jon\AppData\Local\Temp

Image
Image

Tau sau tag nrho cov kev hloov pauv ib puag ncig ib zaug, tsuas yog ua set los ntawm kab hais kom ua. Los yog, sim set user rau cov npe ntawm txhua qhov hloov pauv uas pib nrog user (nws ua haujlwm nrog ib qho ua ntej).

Cov zis zoo li qhov no, qhov twg qhov hloov pauv lub npe tau teev ua ntej, ua raws =, thiab tom qab ntawd tus nqi:


ALLUSERSPROFILE=C:\ProgramData

APPDATA=C:\Users\jonfi\AppData\Roaming

asl. log=Destination=file

CommonProgramFiles=C:\Program Files\Common Files

CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files

CommonProgramW6432=C:\Program Files\Common Files

COMPUTERNAME=DESKTOP-IAEQDK8ComSpec=C: \WINDOWS\system32\cmd.execonfigsetroot=C:\WINDOWS\ConfigSetRootDriverData=C:\Windows\System32\Drivers\DriverData

HOMEDRIVE=C:

HOMEPATH=\Users\jonfi

LOCALAPPDATA=C:\Users\jonfi\AppData\Local

LOGONSERVER=\\DESKTOP-IAEQDK8

Enter set > ev.txt txhawm rau hloov cov lus txib tawm mus rau cov ntaub ntawv kom tau txais tag nrho cov npe ntawm ib puag ncig hloov pauv tau khaws cia rau hauv TXT daim ntawv.

PowerShell Sau-Output Command

Koj tseem tuaj yeem siv Windows PowerShell kom pom dab tsi ib puag ncig hloov pauv cov ntsiab lus rau, tab sis cov syntax txawv me ntsis. Nov yog ob txoj hauv kev ua nws:


Write-Output $env:temp

echo $Env:temp

Image
Image

Siv cov lus txib no kom pom txhua qhov hloov pauv tau teev ua ke:


Get-ChildItem Env:

System Properties

Yog tias cov cuab yeej hais kom ua rau koj ntshai (lawv yuav tsum tsis txhob), nws muaj txoj hauv kev ntev dua los kuaj xyuas tus nqi ntawm ib puag ncig hloov pauv.

Lub taub hau rau Tswj Vaj Huam Sib Luag, tom qab ntawd System applet. Thaum muaj, xaiv Advanced system settings, tom qab ntawd Environment Variables hauv qab. Nov yog daim ntawv teev npe tsis tiav, tab sis cov uas tau teev tseg muaj qhov tseem ceeb ntawm lawv.

Image
Image

Linux printenv Command

Ntawm Linux systems, koj tuaj yeem ua tiav printenv hais kom ua los ntawm kab hais kom sau tag nrho cov kev hloov pauv ib puag ncig uas tau teev tseg tam sim no.

Pom zoo: