Ubuntu 18.04 优化
软件:
Double commander
一款很好的文件管理器,类似TC的免费开源的资源管理器软件。开源免费,跨平台。方便文件管理与拷贝,如向U盘的文件复制。
$sudo apt-get install doublecmd-qt
其他推荐软件:
1. oh my zsh : 终极Shell
(1) 安装 zsh (2) 安装 git (3) 安装 oh my zsh: #sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 或 #sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" 若上述命令者不能安装则可使用国内源安装 oh my zsh,执行下面3个步骤: #wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh #chmod +x install.sh #./install.sh (4) chsh -s /bin/zsh (5) 修改在~/.zshrc文件,ZSH_THEME 设置为主题:ys,也可以设置为其他主题
oh my zsh 常用插件:
(1) 命令行䃼全插件:incr-0.2 下载然后放置到 .oh-my-zsh/plugins 下, 在~/.zshrc文件末尾加上source "$ZSH_CUSTOM/plugins/incr-0.2.zsh" (2) Zsh命令自动补全插件 zsh-autosuggestions #git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions 在~/.zshrc文件中找到plugins{ git }数组,加入zsh-autosuggestions名字如下: plugins{ git, zsh-autosuggestions } (3)Zsh命令语法高亮插件 zsh-syntax-highlighting #git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting 在~/.zshrc文件末尾加上 source "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" 最后执行 source ~/.zshrc 让配置马上起作用
2. tmux : 多终端工具
复制 按住shift键,然后拖动鼠标复制要选择的内容,然后按下shift+ctrl+c
粘贴 按下shift+ctrl+v
#配置文件: vim ~/.tmux.conf #---------------------------------------------- # Send prefix Alt(M)-a - 修改前缀为 Alt+a set -g prefix M-a unbind C-b #---------------------------------------------- # Easy config reload bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded" # Set easier window split keys bind-key \ split-window -h bind-key - split-window -v # Use Control(C) arrow keys to switch panes bind -n C-Left select-pane -L bind -n C-Right select-pane -R bind -n C-Up select-pane -U bind -n C-Down select-pane -D # Shift(S) arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window #switch panel bind ^u swapp -U bind ^d swapp -D bind ^a last bind q killp #---------------------------------------------- bind '~' splitw htop #top bind ! splitw ncmpcpp #music bind m command-prompt "splitw -h 'exec man %%'" unbind s #---------------------------------------------- #status bar set -g status-left "#[fg=white,bg=blue] > #I < #[default] |" # 0:bash #set -g status-left "#[fg=white,bg=blue] > #I < #[default] |" # session-name set -g status-right "#[fg=yellow,bright][ #[fg=cyan]#W #[fg=yellow]]#[default] #[fg=yellow,bright]- %Y.%m.%d #[fg=green]%H:%M #[default]" set -g status-right-attr bright set -g status-bg black set -g status-fg white set -g set-clipboard on setw -g window-status-current-attr bright #setw -g window-status-current-bg red setw -g window-status-current-bg green setw -g window-status-current-fg white #set -g status-utf8 on set -g status-interval 1 #set -g visual-activity on #setw -g monitor-activity on #set -g status-keys vim #---------------------------------------------- #mouse operation support set-option -g mouse on # move x clipboard into tmux paste buffer bind C-p run "tmux set-buffer \"$(xclip -o -sel clipbaord)\"; tmux paste-buffer" # move tmux copy buffer into x clipboard bind C-y run "tmux show-buffer | xclip -i -sel clipbaord" #---------------------------------------------- #将 r 设置为加载配置文件,并显示"reloaded!"信息 bind r source-file ~/.tmux.conf \; display "Reloaded!" #开启鼠标支持 set-option -g mouse on
tmux 常用命令:
tmux new 将创建默认名称的会话(在tmux命令模式使用new命令可实现同样的功能) tmux new -s mysession 创建名为mysession的会话 tmux ls 显示会话列表 tmux a 连接上一个会话 tmux a -t mysession 连接指定会话 tmux rename -t s1 s2 重命名会话s1为s2 tmux kill-session 关闭上次打开的会话 tmux kill-session -t s1 关闭会话s1 tmux kill-session -a -t s1 关闭除s1外的所有会话 tmux kill-server 关闭所有会话
3. typora : MarkDown编辑器
4. uget : 下载工具
5. teamviewer : 远程控制的应用程序
Ubuntu Gnome 软件:
1. GNOME Tweak Tool : 系统管理工具
2. Albert : 全盘、网络查找启动工具,类似 Spotlight, Listary
$wget -nv https://download.opensuse.org/repositories/home:manuelschneid3r/xUbuntu_18.04/Release.key -O Release.key $sudo apt-key add - < Release.key $sudo apt-get update $sudo apt-get install albert
3. FSearch: 仿everything 的搜索工具
sudo add-apt-repository ppa:christian-boxdoerfer/fsearch-daily sudo apt-get update sudo apt install fsearch-trunk
4. Plank : 好用的Dock
5. fusuma : 给Gnome增加触摸板手势
优化及软件安装:
0. 设置系统语言为中文,更新系统语言包
常用命令:
$apt-get install wget $apt-get install curl
- 修改Ubuntu源
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_bk $ sudo gedit /etc/apt/sources.list $ sudo apt-get update
Ubuntu18.04源列表 : [http://blog.csdn.net/enjoy5512/article/details/53137918][1]
- 安装Vim
$ sudo apt-get install vim
- 安装chrome(可选)
下载chrome包: $ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb $ sudo apt-get install libappindicator1 libindicator7 $ sudo dpkg -i google-chrome-stable_current_amd64.deb $ sudo apt-get -f install
- 安装搜狗输入法(可选)
到官网下载安装包 $ sudo dpkg -i sogoupinyin_xxxx_amd64.deb $ sudo apt --fix-broken install $ sudo dpkg -i sogoupinyin_xxxx_amd64.deb 设置: Setting >> Laguage Support >> Language >> keyboard input method system: fcitx 注销账户,重新登录,屏幕右上角出现“键盘”标志,点击“设置”,在新窗口的左下角将“根据当前语言选择”项目勾选取消,点击加号,选择“Sogou pinyin”选项,即可成功添加搜狗输入法。
- 安装WPS Office
官网下载 http://community.wps.cn/download/ 下载 libpng12-0_1.2.50-2+deb8u3_amd64.deb $ sudo dpkg -i libpng12-0_1.2.50-2+deb8u3_amd64.deb $ sudo dpkg -i wps-office_10.1.0.5672_a21_amd64.deb
- 安装vpnc, g++
$ sudo apt-get install g++ vpnc
- 安装openssh-server
$ sudo apt-get install openssh-server
- 安装unrar
$ sudo apt-get install unrar
- 安装gdb-dashboard
$ wget -P ~ git.io/.gdbinit $ mv ~/.gdbinit ~/.gdb-dashboard
然后在使用gdb调试的时候可以在gdb界面调用gdb-dashboard
(gdb) source ~/.gdb-dashboard
也可以直接修改~/.gdbinit,加入source ~/.gdb-dashboard使gdb在载入时自动加载gdb-dashboard
- 安装Virtualbox
下载安装包 $ sudo dpkg -i virtualbox-5.2_5.2.2-119230_Ubuntu_zesty_amd64.deb $ sudo apt install libqt5x11extras5 $ sudo apt --fix-broken install $ sudo apt install libsdl1.2debian $ sudo dpkg -i virtualbox-5.2_5.2.2-119230_Ubuntu_zesty_amd64.deb $ sudo apt-get -y install dkms vbox NAT 下需要设置端口映射才能访问虚拟机: Setting Attached to: NAT Advanced >> Port Forwarding >> Add : Name: SSH Protocol: TCP Host IP: 127.0.0.1 Host Port: 22000 Guest IP: 10.0.2.15 Guest Port: 22 testing: $sudo apt install net-tools $sudo netstat -nap | grep 22000 $ssh -p 22000 root@127.0.0.1 vbox Host-Only 下可直接访问虚拟机
- 安装CodeBlocks , Visual Studio Code
Visual Studio Code 安装 -- 也可以通过Ubuntu软件安装 下载安装包 $ sudo dpkg -i code_1.18.1-1510857349_amd64.deb CodeBlocks 安装 -- 也可以通过Ubuntu软件安装 $ sudo add-apt-repository ppa:damien-moore/codeblocks-stable $ sudo apt-get install codeblocks $ sudo apt-get install codeblocks-contrib
- 安装Python开发工具:pycharm
下载软件 在linux系统下打开网址: http://www.jetbrains.com/pycharm/download/#section=linux,选择社区版,保存 $tar -xvzf pycharm-community-xxxx.tar.gz 进入解压目录 $cd pycharm-community-xxxx/bin 运行即可 $sh pycharm.sh &
- 安装Java,JSP开发环境:Eclipse
(1) 下载安装 Eclipse (2) 下载安装 JDK (3) 安装 MariaDB
- 安装服务管理软件 sysv-rc-conf
查询系统启动时消耗时间排名:
systemd-analyze blame
安装 sysv-rc-conf
sudo nano /etc/apt/sources.list 添加:deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse sudo apt update sudo apt install sysv-rc-conf sudo sysv-rc-conf #运行程序
==========================================
xx. Some Alias:
$vim ~/.bashrc $source ~/.bashrc
alias f='find / -type f -iname ' alias fall='find -depth -type f -iname "*.*" | xargs grep --color -nE -ir' alias fc='find -depth -type f -iname "*.c" | xargs grep --color -nE -ir' alias fcpp='find -depth -type f -iname "*.cpp" | xargs grep --color -nE -ir' alias r='sudo su' alias h='history 100 | grep -i' alias tailf='tail -f' alias rm="rm -i" alias ..='cd ..' alias ...='cd ../../' alias ....='cd ../../../' alias .....='cd ../../../../' alias ......='cd ../../../../../' alias python=/usr/bin/python2.7 alias python3=/usr/bin/python3.6 alias doc=~/Documents alias down=~/Downloads
==========================================
code::block 导致 apt update 失败
![][2]
解决方法:
cd /etc/apt/sources.list.d sudo mv damien-moore-ubuntu-codeblocks-stable-bionic.list damien-moore-ubuntu-codeblocks-stable-bionic.list.save
[1]: https://blog.csdn.net/zhangvalue/article/details/80277888 [2]: https://www.crs811.com/uploads/2018/10/563d8f1e7114e1486e9bece9daae3854.png