Ubuntu20.04 open files修改
时间: 2024-06-04 16:06:25 浏览: 84
要在Ubuntu 20.04上修改打开的文件限制,您可以按照以下步骤操作:
1. 打开终端。
2. 输入以下命令并按Enter键:
sudo nano /etc/security/limits.conf
3. 在文件末尾添加以下两行:
* hard nofile 65535
* soft nofile 65535
这将允许每个用户打开最多65535个文件。
4. 按Ctrl + O保存更改。
5. 按Ctrl + X退出nano编辑器。
6. 重新启动计算机以使更改生效。
完成后,您应该能够打开更多的文件。请注意,这些更改将影响所有用户。
相关问题
Ubuntu 20.04 smb
SMB (Server Message Block) is a protocol used for sharing files, printers, and other resources between computers on a network. Here are the steps to set up SMB on Ubuntu 20.04:
1. Install Samba:
```
sudo apt update
sudo apt install samba
```
2. Create a directory to share:
```
sudo mkdir /home/<your-username>/smb_share
```
3. Edit the Samba configuration file:
```
sudo nano /etc/samba/smb.conf
```
4. Add the following lines to the end of the file:
```
[smb_share]
path = /home/<your-username>/smb_share
read only = no
guest ok = yes
```
Replace `<your-username>` with your actual username.
5. Save and exit the file.
6. Restart the Samba service:
```
sudo service smbd restart
```
7. Open the file manager and navigate to `smb://localhost/smb_share` to access the shared directory.
Note: If you want to share the directory with other computers on the network, you may need to configure the firewall and Samba user accounts accordingly.
ubuntu20.04配置vscode
1. 安装VSCode:打开终端,输入以下命令
```
sudo apt update
sudo apt install code
```
2. 安装常用插件:打开VSCode,按下Ctrl+Shift+X,搜索并安装以下插件
- Chinese (Simplified) Language Pack for Visual Studio Code
- GitLens — Git supercharged
- Live Server
- Prettier - Code formatter
- Bracket Pair Colorizer 2
- Path Intellisense
3. 配置VSCode:打开VSCode,按下Ctrl+Shift+P,输入“settings”,选择“Open User Settings”,在右侧的编辑器中添加以下配置
```
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
"editor.minimap.enabled": false,
"workbench.colorTheme": "Default Light+",
"workbench.iconTheme": "vscode-icons",
"terminal.integrated.fontSize": 16,
"terminal.integrated.shell.linux": "/bin/bash",
"files.autoSave": "onFocusChange",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
},
"git.autofetch": true,
"git.enableSmartCommit": true,
"git.confirmSync": false,
"git.defaultCloneDirectory": "~/Documents/GitHub",
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
"liveServer.settings.donotShowInfoMsg": true,
"liveServer.settings.donotVerifyTags": true,
"liveServer.settings.port": 5500,
"liveServer.settings.root": "/path/to/project",
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"prettier.printWidth": 120,
"prettier.tabWidth": 2,
"prettier.useTabs": false,
"prettier.jsxSingleQuote": true,
"prettier.jsxBracketSameLine": false,
"prettier.arrowParens": "avoid",
"prettier.bracketSpacing": true,
"prettier.semi": true,
"prettier.proseWrap": "always",
"prettier.htmlWhitespaceSensitivity": "ignore",
"prettier.endOfLine": "auto",
"bracket-pair-colorizer-2.colors": [
"#FF6B6B",
"#74E9FF",
"#A9FF9D",
"#FFD86B",
"#FF74F5",
"#B2B2B2"
],
"path-intellisense.autoSlashAfterDirectory": true,
"path-intellisense.extensionOnImport": true,
"path-intellisense.showHiddenFiles": true,
"path-intellisense.ignorePatterns": [
"**/node_modules/**",
"**/bower_components/**",
"**/dist/**",
"**/build/**",
"**/coverage/**",
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**"
]
```
4. 配置中文输入法:打开终端,输入以下命令
```
sudo apt install fcitx fcitx-googlepinyin fcitx-config-gtk
```
打开“设置”->“Region & Language”,将“Input Sources”中的“English (US)”删除,添加“Chinese (Pinyin)”,然后在“Keyboard Shortcuts”中将“Switch to next source”和“Switch to previous source”分别设置为“Ctrl+Space”和“Ctrl+Shift+Space”。
5. 配置终端:打开终端,按下Ctrl+Shift+P,输入“settings”,选择“Open User Settings”,在右侧的编辑器中添加以下配置
```
"terminal.integrated.shell.linux": "/bin/bash",
"terminal.integrated.fontFamily": "Ubuntu Mono",
"terminal.integrated.fontSize": 16,
"terminal.integrated.cursorStyle": "underline",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.scrollback": 10000,
"terminal.integrated.rightClickBehavior": "copyPaste",
"terminal.integrated.copyOnSelection": true,
"terminal.integrated.shellArgs.linux": [
"--login"
]
```
6. 配置文件管理器:打开终端,输入以下命令
```
sudo apt install nautilus-admin nautilus-image-converter
```
打开文件管理器,右键单击文件或文件夹,选择“Open as Administrator”可以以管理员身份打开文件或文件夹;右键单击图片文件,选择“Resize Images”可以调整图片大小。
7. 配置字体:打开终端,输入以下命令
```
sudo apt install fonts-firacode
```
在VSCode的设置中将“editor.fontFamily”设置为“Fira Code”,并在“editor.fontLigatures”中添加“'ss'”。
8. 配置主题:打开终端,输入以下命令
```
sudo apt install gnome-tweaks
```
打开“Gnome Tweaks”,在“Appearance”中选择“Yaru-dark”主题,在“Fonts”中选择“Fira Code Regular”字体。
9. 配置系统:打开终端,输入以下命令
```
sudo apt update
sudo apt upgrade
sudo apt autoremove
```
以上就是Ubuntu 20.04配置VSCode的步骤。
阅读全文
相关推荐














