2018年10月31日星期三

ubuntu非root权限非chsh更改默认shell

参考https://blog.csdn.net/silent56_th/article/details/81367774

默认shell为sh,希望改为bash,修改~/.profile文件,增加两行如下:

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
# modified for changing default shell to bash
else
    export SHELL=/bin/bash
    exec /bin/bash -l
fi

2018年10月17日星期三

mac彻底删除软件

以CleanMyMac为例,mdfind -name CleanMyMacX,然后删除所有列出的文件

mac上通过homebrew安装redis

brew install redis

开机启动redis命令
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

使用配置文件启动redis server
$ redis-server /usr/local/etc/redis.conf

停止redis server的自启动
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

卸载redis和它的文件
$ brew uninstall redis
$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

mac中配置clion增加内存

运行clion时报内存溢出错误。

vim /Applications/CLion.app/Contents/bin/clion.vmoptions,增加内存配置。