linux:umask
差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版 | |||
linux:umask [2022/04/13 11:04] – packingbox | linux:umask [2022/04/13 11:07] (当前版本) – packingbox | ||
---|---|---|---|
行 7: | 行 7: | ||
%%To dispay the current value of **umask**, run the //umask// command without any options:%% | %%To dispay the current value of **umask**, run the //umask// command without any options:%% | ||
- | {{https://geek-university.com/ | + | {{:linux: |
%%Ignore the first zero for now. The last three numbers represent the default **umask value**.%% | %%Ignore the first zero for now. The last three numbers represent the default **umask value**.%% | ||
行 13: | 行 13: | ||
%%To temporarily change your **umask** value, run the// umask// //VALUE// command. This changes the umask value only for the current shell:%% | %%To temporarily change your **umask** value, run the// umask// //VALUE// command. This changes the umask value only for the current shell:%% | ||
- | {{https://geek-university.com/ | + | {{:linux: |
%%In the picture above you can see that we have changed the **umask** value to** 044**. Remember the numbers representing the permissions: | %%In the picture above you can see that we have changed the **umask** value to** 044**. Remember the numbers representing the permissions: | ||
行 21: | 行 21: | ||
%%To change the default umask value permanently for a specific user, you need to modify the **.bashrc** file in the user’s home directory. For example, to change the default umask for user** bob**, just add the following line at the end of the **/ | %%To change the default umask value permanently for a specific user, you need to modify the **.bashrc** file in the user’s home directory. For example, to change the default umask for user** bob**, just add the following line at the end of the **/ | ||
- | {{https://geek-university.com/ | + | {{:linux: |
%%Reopen the shell. The default umask value is now **044**:%% | %%Reopen the shell. The default umask value is now **044**:%% | ||
- | {{https://geek-university.com/ | + | {{:linux: |
%%To change the default umask value permanently for all users, you can use the following command:%% | %%To change the default umask value permanently for all users, you can use the following command:%% | ||
行 31: | 行 31: | ||
// | // | ||
- | {{https://geek-university.com/ | + | {{:linux: |
%%Replace the last three numbers with the umask of your choice. The change will be made the next time you log in to the system. Note that the umask definition in the **.bashrc** file will override the system umask.%% | %%Replace the last three numbers with the umask of your choice. The change will be made the next time you log in to the system. Note that the umask definition in the **.bashrc** file will override the system umask.%% |
linux/umask.txt · 最后更改: 2022/04/13 11:07 由 packingbox