一条语句改系统/用户的bash设置:
sudo gedit ~/.bashrc; gedit ~/.profile; gedit /etc/bash.bashrc; gedit /etc/profile
查看CPU信息
cat /proc/cpuinfo | grep vmx ##(for Intel CPU)
or
cat /proc/cpuinfo | grep svm ##(for AMD CPU)
- 查看核心数:
- cat /proc/cpuinfo|grep processor|wc -l
sudo gedit ~/.bashrc; gedit ~/.profile; gedit /etc/bash.bashrc; gedit /etc/profile
- 启动postgresql服务:sudo service postgresql start
- 查看版本信息:sudo -u postgres psql --version
- 查看java版本:java -version
- 查psql位置:locate psql | grep /bin
- 链接服务器,登录postgres: ssh username@host
- postgres 登录:sudo -u postgres psql
- 普通用户test1登录:psql -U test1 -d richard_restore -W; su -l postgres
- 编译环境变量: source /etc/profile
- 重启postgresql服务:richard_ma@richardma:/etc/postgresql/9.5/main$ /etc/init.d/postgresql restart
- 编辑配置文件:richard_ma@richardma:/etc/postgresql/9.5/main$ sudo vi pg_hba.conf
- 查找某一文件:sudo find / -name postgresql.conf [sudo] password for richard_ma: (Local) /etc/postgresql/9.5/main/postgresql.conf (Server) /var/lib/pqsql/9.2/data/pg_log/
- 查软件版本:aptitude show 软件名 dpkg -l软件名
- 查安装路径:dpkg -L 软件名 whereis 软件名
- 系统安装盘的话,命令把光驱挂载到/mnt目录下: mount /dev/cdrom /mnt