windows10自带unbutu16.4 LTS忘记root密码
1、进入Ubuntu,打开一个终端
2、sudo passwd root
3、输入新密码,确认密码。
4、修改密码成功,切换至管理员账号su root,输入新密码,成功
Ubuntu更改其他用户密码(如user)步骤:
1、进入Ubuntu,打开一个终端,输入 sudo su转为root用户。 注意,必须先转为root用户!!!
2、sudo passwd user(user 是对应的用户名)
3、输入新密码,确认密码。
4、修改密码成功,重启,输入新密码进入Ubuntu
windows10自带unbutu16.4 LTS安装界面
切换清华源
备份源文件并更改源
1 | sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak |
把里面的都注释,然后直接把完整源放在文件后面
1 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse |
执行
1 | sudo apt-get update |
安装三个软件,xorg,xfce,xrdp
1 | sudo apt-get install xorg |
升级node 版本(linux)
npm install -g n
报错
1 | npm ERR! notsup Unsupported platform for n@2.1.8: wanted |
解决方案
1 | npm install -g n -force |
创建react项目出错
1 | internal/modules/cjs/loader.js:584 |
结局方案:删除npm系统文件夹内的node_modules中的create-react-app文件夹
然后执行命令
1 | cnpm install -g create-react-app |
React错误1 JSX表达式必须具有一个父元素。
1 | Failed to compile |
import React, {Component,Fragment} from ‘react’;
import { render } from ‘react-dom’;
class TodoList extends Component {
render(){
return (
)
}
}
export default TodoList;
1 | ## React中得响应式设计思想和事件绑定 |
TypeError: Cannot read property ‘state’ of undefined
handleInputChange
D:/react/todolist/src/TodoList.js:33
30 | )
31 | }
32 | handleInputChange(e) {
33 | this.state.inputValue= e.target.value;
34 | // console.log(e.target.value);
35 | }
36 | }
View compiled▶ 22 stack frames were collapsed. This screen is visible only in development. It will not appear if the app crashes in production. Open your browser’s developer console to further inspect this error. Click the 'X' or hit ESC to dismiss this message.
1 | this只想问题 |