zoukankan      html  css  js  c++  java
  • 第二节课 虚拟机安装


    五、安装虚拟机 执行第一个python
    1. 几个问题
    1) root密码默认不启动,需要启动root密码,并且用户账号和root账号自由切换
    执行sudo passwd root ,设置密码 (或者 sudo apt-get install zhcon / sudo zhcon --utf8)
    su root
    su fly321283
    2) 将文件的中文改成英文,这样命令行窗口下不会有乱码, 5月变成May
    root 下输入vim 安装vim apt-get install vim
    sudo vim /etc/default/locale
    修改
    LANG=zh_CN.UTF-8
    LANGUAGE=zh_CN:zh

    LANG="en_US.UTF-8"
    LANGUAGE="en_US:en"

    使用到的vim命令 i esc :q :wq

    3) 安装增强插件可以有命令直接安装
    sudo apt-get install linux-headers-generic (不需要下载iso文件)

    2. 进入tmp文件夹, 建立文件hello.py 输入 print "hello world" 并执行
    打开编辑器 nano hello.py
    输入代码 print "hello world"
    退出并保存 Ctrl + X y
    执行命令 python hello.py
    查看版本 python -V

    wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz

    -- 知乎答案
    sudo add-apt-repository ppa:fkrull/deadsnakes
    sudo apt-get update
    sudo apt-get install python3.5


    3. 安装虚拟终端xfce4
    sudo apt-get install xfce4


    设备-共享剪贴板-双向 可以相互复制

    r read
    w write
    x excute

    r-4
    w-2
    x-1

    d -代表文件 d 代表 文件夹
    rwx 该文件或者文件夹所属的用户对文件的操作权限
    r-x 该文件或者该文件夹所属的用户组对该文件的操作权限
    r-x 其他用户或者用户组对该文件的操作权限

    3.1 创建一个文件并改变文件的权限

    cd /home/fly321283
    mkdir workspace
    chmod 777 workspace

    cd workspace
    touch test.txt
    rm text.txt

    查看文件 nano kern.log
    查看文件的10行 tail -n 10 kern.log tail -10 kern.log
    查看帮助文档 main tail

  • 相关阅读:
    Vue项目一、node.js和npm的安装和环境搭建
    vue-cli脚手架目录(2.0)
    你的程序要读入一系列正整数数据,输入-1表示输入结束,-1本身不是输入的数据。程序输出读到的数据中的奇数和偶数的个数。
    100以内最大的能被17整除的整数
    what is artificial Intelligence
    画图
    No understanding(2)
    No understanding(1)
    对决
    谁是最好的Coder
  • 原文地址:https://www.cnblogs.com/huiming/p/5510537.html
Copyright © 2011-2022 走看看