ubuntu必备
环境Mac ,Ubuntu19,Virtualboxmac Virtualbox Ubuntu 设置共享目录设置mac主机的共享文件夹,这里共享文件夹的名字是share,固定分配和自动挂载都选上,免得每次重启都得重新挂载。Install Guest Additions进入虚拟机后,点击置顶的菜单条->devices->Install Guest Addition...
·
开发必备编译环境
# 编译环境
apt-get install build-essential make automake autoconf libtool-bin
apt-get install git qemu-system-x86 vim-gnome gdb cgdb eclipse-cdt make diffutils exuberant-ctags tmux cscope meld qgit gitg gcc-multilib gcc-multilib g++-multilib
# 最小需要的安装包
sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
# On 64-bit machines, you may need to install a 32-bit support library.
apt-get install gcc-multilib
# openssl安装
apt-get install openssl libssl-dev
apt-get install zlib1g-dev libsdl1.2-dev libesd0-dev
设置笔记本合上盖子时不进入休眠
修改 Login Manager的配置文件。
sudo vim /etc/systemd/logind.conf
然后将其中的:
#HandleLidSwitch=suspend
改成:
HandleLidSwitch=ignore
然后重启服务:
sudo restart systemd-logind
# or
service systemd-logind restart
# or 直接重启
sudo shutdown -r now
安装haroopad(Markdown编辑器)
$ wget https://bitbucket.org/rhiokim/haroopad-download/downloads/haroopad-v0.13.1-ia32.deb
$ sudo apt-get install gdebi
$ sudo gdebi haroopad-v0.13.1-ia32.deb
安装deb文件
# 安装
sudo dpkg -i deb文件名
# 根据经验,通常情况下会报依赖关系的错误,我们可以使用以下的命令修复安装。
sudo apt-get install -f
# 查看已安装
sudo dpkg -l
# 卸载
sudo dpkg -r 软件名
terminal 显示git分支
in file ~/.bashrc
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\e[91m\]\$(parse_git_branch)\[\033[00m\]\$ "
#PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
ubuntu18更换国内源
cat >> /etc/apt/sources.list << "EOF"
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
EOF
apt-get update
apt-get upgrade
更多推荐
已为社区贡献1条内容
所有评论(0)