【笔记】ubuntu更改手记(附sublime配置)

前言

双系统安装见windows10+ubuntu 双系统安装手记

常用操作

快捷键

alt+F2 输入命令
ctrl+alt+T 打开终端

常用命令

./name可以用来执行当前目录下的二进制程序,其中:

  1. .表示当前目录
  2. ./表示当前目录下
  3. ./name表示执行当前目录下的name文件

通用更改

基础设置

  1. 调整显示器位置:设置-设备-显示-显示器排列
  2. 大号文本:设置-通用辅助功能-大号文本-打开
  3. 更换软件源:软件和更新-下载自-其他站点-aliyun或huaweicloud
  4. 软件更新:sudo apt-get upgrade

浏览器

  1. 使用ubuntu软件搜索chrominum然后安装。
  2. 登陆chrome账号,同步书签、密码及应用,设置应用从菜单中隐藏。
  3. 可以把常用网站都登陆一下。

设置密钥环

  1. 设置了开机登陆不需要密码后,每次登陆需要输入一个密钥环。
  2. 通过终端进入seahorse,修改默认密钥环的密码为空。
  3. 可能会出现安全问题。

输入法

  1. 下载搜狗输入法并安装
  2. 设置-区域和语言-管理已安装的语言-键盘输入法系统-fcitx
  3. 注销并重新登录,已经可以使用搜狗输入法
  4. 可以选择登录搜狗个人中心。

linux qq

  1. 进入linux-qq下载地址
  2. 根据帮助选择硬件架构与格式下载(我的是x64+deb)并安装
  3. 手机qq扫码登录。
  4. 界面非常古老,但基础的聊天、传文件都是没有问题的。

网易云音乐

  1. 进入下载地址
  2. 点击右上角——下载全部客户端,选择Linux版,下载,安装。
  3. 字体会很小,解决方案是将https://blog.csdn.net/weixin_36349646/article/details/102879728https://blog.csdn.net/jianghe_130/article/details/85275101这两篇文章结合起来,有时间再做。

编程相关

sublime

  1. ubuntu软件安装sublime
  2. 配置好项目目录

C++

  1. 执行sudo apt-get install g++来安装g++.
  2. sublime->tools->build system->new build system,设置如下编译选项,命名为cpp_littlefall.sublime-build。其中默认选项是仅编译,其他选项见名字。
    后来更新了一波,给$file$file_base_name加上了引号,否则无法正确编译带空格的路径。
  3. 再更新了一波,把打开终端后两个命令之间的&&改成了&,这样前一个命令失败后终端不会闪退。
{
	"encoding": "utf-8",
	"working_dir": "$file_path",
	"shell_cmd": "g++ -Wall -D _LITTLEFALL_ -std=c++14 \"$file\" -o $file_base_name",
	"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
	"selector": "source.c++",
 
	"variants": 
	[
		{	
		"name": "compile and run, in terminal",
        	"shell_cmd": "g++ -Wall -D _LITTLEFALL_ -std=c++14 \"$file\" -o $file_base_name && gnome-terminal -- bash -c './$file_base_name&read' "
		},
		{	
		"name": "compile and run, in sublime",
        	"shell_cmd": "g++ -Wall -D _LITTLEFALL_ -std=c++14 \"$file\" -o $file_base_name & ./$file_base_name "
		},
		{	
		"name": "only run, in terminal",
        	"shell_cmd": "gnome-terminal -- bash -c './$file_base_name&read'"
		},
		{	
		"name": "only run, in sublime ",
        	"shell_cmd": "./$file_base_name"
		}
	]
}
  1. sublime->tools->developer->new Snippet,设置如下内容,命名为cpp_entry.sublime-snippet.
<snippet>
	<content><![CDATA[
#include <bits/stdc++.h>
using namespace std; using ll = long long; inline int read();
const int M = 100016, MOD = 1000000007;

int main(void)
{
	#ifdef _LITTLEFALL_
	freopen("in.txt","r",stdin);
    #endif

    ${0:printf("It's your reflection looking back to pull you down.\n");}

    return 0;
}

inline int read(){
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9') {if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
]]></content>
	<tabTrigger>sa</tabTrigger>
	<scope>source.c++</scope>
</snippet>

python

{
	"encoding": "utf-8",
	"working_dir": "$file_path",
	"shell_cmd": "python3 \"$file\"",
	"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
	"selector": "source.python",
 
	"variants": 
	[
		{	
		"name": "build by python3, run in terminal",
        	"shell_cmd": "gnome-terminal -- bash -c 'python3 \"$file\"&read' "
		},
		{	
		"name": "build by python2, run in sublime",
        	"shell_cmd": "python2 \"$file\" "
		},
		{	
		"name": "build by python2, run in terminal",
        	"shell_cmd": "gnome-terminal -- bash -c 'python2 \"$file\"&read' "
		},
		{	
		"name": "run python3 console",
        	"shell_cmd": "gnome-terminal -- python3"
		},
		{	
		"name": "run python2 console",
        	"shell_cmd": "gnome-terminal -- python2"
		}
	]
}

剩余问题

应用程序界面无法使用安装的输入法。

发布了375 篇原创文章 · 获赞 305 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/m0_37809890/article/details/103528780