fdisk-l
mount /dev/sdb4 /mnt
cd /mnt
mkdir fordername
cd fordername
cp hello.cpp /home/username
cp hello.cpp /mnt/fordername
Debian GNU/Linux
(WSL) Windows Subsystem for Linux
C:\Users\username\AppData\Local\Packages\TheDebianProject.DebianGNULinux_*\LocalState\rootfs
sudo passwd
su root
vi /etc/apt/sources.list
# https://www.cnblogs.com/liuguanglin/p/9397428.html
sudo apt-get install ca-certificates
sudo apt-get install apt-transport-https
sudo apt-get update
# installing base compile tools
sudo apt-get install sudo vim perl gcc g++ gfortran default-jdk
# install java jdk
# sudo apt-get install default-jre default-jdk
# apt-cache search openjdk
# sudo apt-get install openjdk-11-jdk
# install python
sudo apt-get install python3 python3-pip python3-numpy python3-scipy python3-sympy python3-matplotlib
sudo apt-get install python3-pip python3-numpy python3-scipy
pip list
python3 --version
# install MySQL
sudo apt-get install mariadb-server mariadb-client
python3 –m pip install mysql-connector pymysql
sudo apt-get install mysql-server mysql-client
python –m pip install mysql-connector pymysql
# python connect mysql
Python3 MySQL(mysql-connector)
Python3 –m pip install mysql-connector
# https://www.runoob.com/python3/python-mysql-connector.html
#
Python3 MySQL(PyMySQL)
pip3 install PyMySQL
# https://www.runoob.com/python3/python3-mysql.html
#
# Linux GUI
# 1. install apps
sudo apt-get install xorg xfce4 xrdp
# 2. set port 3390
sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
# 3. to xsession write xfce4-session
sudo echo xfce4-session >~/.xsession
# 4. restart xrdp service
sudo service xrdp restart
# iproute2
# ip address show | ip addr show | ip ad sh
ip ad sh
# https://www.cnblogs.com/pachulia/p/9239504.html
# cmd run
ipconfig /all
vim hello.f90
program
print "Hello World"
end progr
# Perl
vim hello.pl
print “Hello world!\n”;
perl hello.pl
# C/C++
vim hello.c
#include <stdio.h>
Int main(int argc, char* argv[])
{
Printf(“Hello World!\n”);
}
gcc hello.c // a.out
./a.out
#
gcc –c hello.c // hello.o
gcc hello.o –o hello // hello
./hello
# makefile
objects = main.o
hello: $(objects)
gcc –o hello $(objects)
.PHONY: clean
clean:
-rm –rf hello $(objects)
# Java
# apt-cache search openjdk
# sudo apt-get install openjdk-11-jdk
vim hello.java
public class hello {
public static void main(String [] args) {
System.out.println (“hello world!”)
}
}
javac hello.java
java hello
# Python
vim hello.py
print(“Hello World!”);
python3 hello.py
# Python GUI Programming
import matplotlib as mpl
mpl.use('TkAgg') # mpl.use('QT5Agg')
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0,6,0.01)
y = np.sin(x)
plt.plot(x,y)
plt.show()
# https://www.linuxidc.com/Linux/2018-03/151117.htm
#
from pylab import show
show()
#
# MySQL
service mysql start
# or /etc/init.d/mysql start
mysql
mysqladmin –u root –p password ‘086021’
mysql –u root –pgrant usage on *.* to 'user01'@'localhost' identified by '123456' with grant option; // add user
grant all privileges on *.* to 'user01'@'localhost' identified by '123456'; // add grant
flush privileges; // update grant