sudo

Linux基本知识——总结

瘦欲@ 提交于 2020-02-03 04:40:18
系统调用层、内核 内核:多任务、硬件管理 桌面环境 X 窗口系统:工具包及架构协议 xorg是实现了 X 协议规范的一个提供图形用户界面服务的服务器,就像实现了 http 协议提供 web 服务的 Apache。 只有服务器也是不能实现一个完整的桌面环境的,还需要一个客户端,我们称为 X Client:KDE,GNOME,XFCE,LXDE, 终端 终端模拟器:接受用户的输入和显示输出。xfce 桌面环境自带的 xfce-terminal。 终端(Terminal)和控制台(Console)区别: 终端对应:/dev/tty设备 Shell Shell命名来源:隐藏了操作系统底层细节。类似cmd, “提供给使用者使用界面”的命令解析器 图形界面:图形Shell 核:内核 Ubuntu 终端默认使用的是 bash,默认的桌面环境是 GNOME 或者 Unity(基于 GNOME), 实验楼使用的分别是zsh 和 xfce。 Shell 用户交互的界面 控制系统的脚本语言 Ctrl+z 将当前程序放到后台运行,恢复到前台为命令 fg Ctrl+a 将光标移至输入行头,相当于 Home 键 Ctrl+e 将光标移至输入行末,相当于 End 键 Ctrl+k 删除从光标所在位置到行末 Alt+Backspace 向前删除一个单词 通配符 字符 含义 * 匹配 0 或多个字符 ? 匹配任意

make grub udisk manually

≯℡__Kan透↙ 提交于 2020-02-03 04:39:34
Below is the steps how to make grub udisk manually my udisk is /dev/sdc clean udisk information(mbr and partition information) sudo dd if=/dev/zero of=/dev/sdc bs=1M count=1024 oflag=direct create dos partition table sudo fdisk /dev/sdc o create a new empty DOS partition table n -> p -> default->default->204800 a toggle a bootable flag w write table to disk and exit sudo mkfs.ext4 /dev/sdc1 sudo mount /dev/sdc1 /media/wrsadmin/boot/ sudo grub-install --root-directory=/media/wrsadmin/boot/ /dev/sdc Installing for i386-pc platform. Installation finished. No error reported. vi grub.cfg, add your

linux简单学习

我是研究僧i 提交于 2020-02-03 04:39:21
linux用户管理 who am i pts/0 中 pts 表示伪终端 whoami 查看当前登录用户的用户名 sudo adduser yeslabs 添加新建用户并为新用户添加home目录 cat /etc/group | sort 查看具体文件 cat /etc/group | grep -E "yeslab" 可以过滤信息 sudo usermod -G sudo lilei shiyanlou 用户执行 sudo 命令将 lilei 添加到 sudo 用户组 sudo deluser lilei --remove-home 删除用户 linux文件权限 ls -l 查看文件权限 ls -Al 查看目录的完整属性 ls -dl 查看文件的大小 sudo chown shiyanlou iphone6 变更文件所有者 将文件iphone6 所有者设为shiyanlou 方法一:chmod 700 iphone7 修改文件权限 方法二:chmod go-rw iphone6 go 表示group/others 还可以加u便是uesr + —分别为增加删除权限 ps: useradd和adduser的区别: useradd 只创建用户,创建完了用 passwd lilei 去设置新用户的密码。adduser 会创建用户,创建目录,创建密码(提示你设置),做这一系列的操作。其实

Manjaro Linux安装VS Code

我的梦境 提交于 2020-02-03 04:26:40
1、首先去微软将 VS Code下载下来, 下载地址如下,选择 tar.gz 64位版本 https://code.visualstudio.com/#alt-downloads 2、下载完成,开始解压 tar -zxvf code-stable-*.tar.gz 3、移动到/opt/目录下 sudo mv VSCode-linux-x64 /opt/ 4、变更权限, 给code增加执行权限 sudo chmod +x /opt/VSCode-linux-x64/code OK, 此时你就可以启动VS Code了 /opt/VSCode-linux-x64/code 5、在桌面上添加图标, 就是要在/usr/share/applications/下创建.desktop文件,如下 sudo touch /usr/share/applications/visualstudiocode.desktop sudo nano /usr/share/applications/visualstudiocode.desktop 6、在desktop文件中写入如下代码 [Desktop Entry] Name=Visual Studio Code Comment=Multi-platform code editor for linux Exec=/opt/VSCode-linux-x64/code

[Linux]安装pyenv

て烟熏妆下的殇ゞ 提交于 2020-02-03 02:59:53
python多版本管理pyenv 网址: https://blog.csdn.net/yingfeng_yang/article/details/82527321 Ubuntu16.04安装pyenv 1、安装下载工具curl sudo apt-get install curl    2、使用curl下载pyenv curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash 提示: export PATH="~/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)"    3、将pyenv添加到环境变量中 sudo vim ~/.bashrc # 添加上述提示内容加入到末尾即可    4、配置文件生效 source ~/.bashrc    5、检查是否安装成功 echo $PATH;    使用pyenv安装python版本 # 1、安装各种依赖 sudo apt-get install libc6-dev gcc sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev

“root” execution of the PostgreSQL server is not permitted

﹥>﹥吖頭↗ 提交于 2020-02-03 02:39:53
问题 When I try to start postgresql I get an error: postgres postgres does not know where to find the server configuration file. You must specify the --config-file or -D invocation option or set the PGDATA environment variable. So then I try to set my config file: postgres -D /usr/local/var/postgres And I get the following error: postgres cannot access the server configuration file "/usr/local/var/postgres/postgresql.conf": Permission denied Hmm okay. Next, I try to perform that same action as an

ppc qemu

浪尽此生 提交于 2020-02-02 15:36:42
qemu-img create -f raw disk-img.raw 2.5G sudo losetup /dev/loop7 disk-img.raw sudo losetup -o $((2048*512)) /dev/loop6 /dev/loop7 sudo mkfs.ext3 /dev/loop6 sudo qemu-system-ppc -cpu G4 -nographic -k en-us -kernel ./Image -m 512 -drive file=disk-img.raw -append "console=ttyS0,115200 ip=dhcp root=/dev/hda1 rw init=/sbin/init" 来源: CSDN 作者: 杨幂的咪 链接: https://blog.csdn.net/Hsu_smile/article/details/85050165

Turtlebot2 rgbdslam_v2环境配置

好久不见. 提交于 2020-02-02 14:07:18
Turtlebot2 rgbdslam_v2环境配置 创建一个工作空间,编译一遍 下载rgbdslam_v2代码包 安装g2o的依赖 创建eigen工作空间 创建g2o工作空间 配置g2o代码包中的CMakeLists.txt文件 编译g2o工作空间 下载PCL1.8(点云库:Point Cloud Library) 配置PCL,使其支持C++2011 编译PCL 配置rgbdslam_v2 编译rgbdslam_v2 环境测试 查看地图 有关博客参考: 创建一个工作空间,编译一遍 $ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws $ catkin_make 下载rgbdslam_v2代码包 $ cd ~/catkin_ws/src $ wget -q http://github.com/felixendres/rgbdslam_v2/archive/kinetic.zip $ unzip kinetic.zip (把解压出来的文件名更改为rgbdslam_v2) $ sudo cp -a ~/catkin_ws/src/rgbdslam_v2 /opt/ros/kinetic/share 安装g2o的依赖 $ sudo apt-get install libsuitesparse-dev 创建eigen工作空间 $ mkdir ~/src $

临时

我们两清 提交于 2020-02-02 13:28:09
ALTER USER root@'%' IDENTIFIED BY 'trading'; set password for root@localhost = password('trading'); GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'trading' WITH GRANT OPTION; 1.查看端口被哪个程序占用 sudo lsof -i tcp:port 如: sudo lsof -i tcp:6399 2.看到进程的PID,可以将进程杀死。 sudo kill -9 PID 如:sudo kill -9 3210 @Test public void e(){ String url = "http://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTLqFpcia3KzB8xZYDFUI1D6y6nVSK0Yy4ibb2tDib8f3UeT6Y3sw44aovURoWkRYZfIbThgRYZjSqyHQ/132"; try { String parentPath = "/Users/zplogo/dev"; String uuid = UUID.randomUUID().toString(); uuid = uuid.replace("-", ""); String

How do you start Python Paramiko SFTP with sudo?

半腔热情 提交于 2020-02-02 08:58:26
问题 Using the standard client.open_sftp() handle gives me SFTP controls but without sudo/root permissions, any sort of /etc/** files can't be edited. I have a user that has passwordless sudo access, I figured I could maybe start off with sudo su and then invoke SFTP but that did not seem to be the case. t = paramiko.Transport(('192.168.56.102', 22)) t.connect(username='vagrant', password='vagrant') chan = t.open_session() chan.get_pty() chan.invoke_subsystem('sftp') chan.exec_command('sudo su')