Ubuntu Common errors and solutions--long-term updates

Source: Internet
Author: User

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 visudoafter entering the user password, you can edit the file
2. Change the boot sequence of Ubuntu and WIN10 dual Systems
    • Terminal operationsudo 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 nautilusthe 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 xxxError, 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
    • Terminal operation
  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
    • Method 1
  sudo apt-get  install p7zip-full  LANG=C 7z x file.zip  convmv -f gbk -t utf8 -r --notest *
    • Method 2
  unzip -O CP936 file.zip
    • Method 3
  sudo apt-get  install unar  unar file.zip

For more highlights, please follow "seniusen"!

Ubuntu Common errors and solutions--long-term updates

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.