1. Repair/etc/sudoers file corruption causes the sudo command not to be used
This is caused by the error of editing the/etc/sudoers file previously, so you can undo the edits, but you cannot edit them directly because you cannot use the sudo command.
- Enter/etc directory in terminal first
pkexec visudo
after entering the user password, you can edit the file
2. Change the boot sequence of Ubuntu and WIN10 dual Systems
- Terminal operation
sudo gedit /etc/default/grub
- Change the value of Grub_default to the serial number 2 where Windows is located, and then run
sudo update-grub
update GRUB.
3. Ubuntu and Win10 dual system time inconsistency
- Terminal Operation
sudo gedit /etc/default/rcS
, the Utc=yes can be changed to Utc=no.
4. File Manager is not open
ps -A | grep nautilus
the results of the operation are as follows:
5463? 00:00:02 Nautilus
Run sudo kill 54631
, end the file manager process, and then you can open it.
You can also open the Task manager directly and end the Nautilus process for the file manager.
5. Through the terminal installation program
sudo apt-get install xxx
Error, Could not get Lock/var/lib/dpkg/lock
not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it
- This problem may occur because another program is running, causing the resource to be locked out of service. The reason that the resource is locked may be that the last time the installation or update did not complete properly, and then this situation, the solution is actually very simple, in the terminal typed the following two sentences.
sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock
6. Gedit Chinese Characters
sudo apt-get install dconf-editor dconf-editor
- Candidate-encodings in org.gnome.gedit.preferences.encodings fill in [' GB18030 ', ' UTF-8 ', ' current ', ' iso-8859-15 ', ' UTF-16 ']
7. Sogou Input Method two icons
- Find the PID corresponding to the process Fcitx-qimpanel, and then kill it, or end the corresponding process directly in the Task Manager.
grep fcitx-qimpanel sudo kill -9 [对应的pid]
- But each boot to kill a very troublesome, simply let it boot execution.
sudo gedit /etc/rc.local # 在exit 0之前添加如下代码 /bin/ps -ef | grep fcitx-qimpanel | grep -v grep | awk ‘{print $2}‘ | xargs kill -9 ps -e 显示所有进程,-f 全格式。 grep -v 反向匹配,即匹配不包括后面字符串的内容。
8. Ubuntu Chinese display is garbled
sudo apt-get install zh-autoconvertsudo apt-get install zhcon$ sudo gedit /var/lib/locales/supported.d/local 在文件中加入加入zh_CN.GBK GBKzh_CN.GB2312 GB2312$ sudo locale-gen$ sudo gedit /etc/environment,增加以下内容:LANGUAGE=”zh_CN:zh:en_US:en”LANG=zh_CN.GBK$ source /etc/environment
9. Ubuntu Unzip Chinese ZIP garbled
sudo apt-get install p7zip-full LANG=C 7z x file.zip convmv -f gbk -t utf8 -r --notest *
unzip -O CP936 file.zip
sudo apt-get install unar unar file.zip
For more highlights, please follow "seniusen"!
Ubuntu Common errors and solutions--long-term updates