美文网首页
Ubuntu的小技巧

Ubuntu的小技巧

作者: 未名的天空 | 来源:发表于2020-02-22 12:23 被阅读0次

国内的Ubuntu的更新源

命令更新:

sudo vi /etc/apt/sources.list ##国内源优先选择aliyun
sudo apt-get update
sudo apt-get upgrade

1. Aliyun

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

2. 网易163

deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

3. 清华大学

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

4.中国科技大学

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

openssh-server 安装和启动

sudo apt-get update
sudo apt-get install openssh-server

ps -e | grep ssh

eval ssh-agent

sudo /etc/init.d/ssh restart

关闭图形界面

  1. version < 18.04.4

    sudo vi /etc/default/grub
    

    得到以下的文件

    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    # For full documentation of the options in this file, see:
    #   info -f grub -n 'Simple configuration'
    
    GRUB_DEFAULT=0
    GRUB_TIMEOUT_STYLE=hidden
    GRUB_TIMEOUT=0
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    ##GRUB_CMDLINE_LINUX_DEFAULT="text"
    GRUB_CMDLINE_LINUX=""
    
    # Uncomment to enable BadRAM filtering, modify to suit your needs
    # This works with Linux (no patch required) and with any kernel that obtains
    # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
    #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
    
    # Uncomment to disable graphical terminal (grub-pc only)
    #GRUB_TERMINAL=console
    
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    #GRUB_GFXMODE=640x480
    
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true
    
    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_RECOVERY="true"
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"注释掉,打开GRUB_CMDLINE_LINUX_DEFAULT="text"

    sudo update-grub
    reboot
    

    打开的话,就是相反的操作

  2. 18.04.4

    关闭图形界面

    sudo systemctl set-default multi-user.target
    sudo reboot
    

    打开图形界面

    sudo systemctl set-default graphical.target
    sudo reboot
    

相关文章

  • Ubuntu的小技巧

    国内的Ubuntu的更新源 命令更新:sudo vi /etc/apt/sources.list ##国内源优先选...

  • ubuntu 16.04(个人备份自用)

    ubuntu使用技巧备份 ubuntu美化 ubuntu下使用nvm安装各种版本的node

  • ubuntu18.04.2 LTS(64bit) Desktop

    4.ubuntu配置 ubuntu安装以后,需要经过以下配置,才会用起来比较方便。个人推荐一个小技巧,vmware...

  • ubuntu 使用小技巧

    1.加速下载wget -i 网址 可以循环下载,但是还是受到网速限制使用多线程工具axel安装axelsudo a...

  • ubuntu终端下的小技巧

    1. ubuntu终端下补全时忽略大小写 在用户的家目录下创建 .inputrc 编辑 .inputrc 文件 在...

  • ubuntu 选择 java 版本小技巧

    ubuntu 选择 java 版本 记录一个小技巧 安装了多个版本的 java (一般是 openjdk 的 7 ...

  • Ubuntu中bash小技巧

    编辑 ~/.inputrc 文件设置如果没有该文件,新建一个就行了 文件末尾添加如下代码:set match-hi...

  • Ubuntu 技巧

    Ubuntu 和 Windows 双系统下,修改默认启动系统为 Windows。 xdotool 是 Ubuntu...

  • 使用小觅深度相机避障

    小觅SDK安装 Ubuntu SDK 源码安装在 Ubuntu 14.04 Ubuntu 16.04 Ubuntu...

  • Ubuntu 常用技巧

    修改启动项rcconf 该工具用于设置开机启动项 rcconf --list 罗列所有开机启动列表 rcconf...

网友评论

      本文标题:Ubuntu的小技巧

      本文链接:https://www.haomeiwen.com/subject/nhklqhtx.html