introduction à l'utilisation du linux "ubuntu", sous windows 10
sous-système Windows pour Linux
Windows Subsystem for Linux (WSL)
reboot
puis choix de la distribution Linux (Ubuntu, Suse ...)
sous-système Windows pour Linux
Windows Subsystem for Linux (WSL)
reboot
puis choix de la distribution Linux (Ubuntu, Suse ...)
user: be4
shell: bash
Copy Ctrl+C
Paste Ctrl+V
vs
Copy Ctrl+Shift+C
Paste Ctrl+Shift+V
= avec espace !!
shell: bash
Copy Ctrl+C
Paste Ctrl+V
vs
Copy Ctrl+Shift+C
Paste Ctrl+Shift+V
= avec espace !!
# ll /etc/*eleaseubuntu.com/tutorials/tutorial-ubuntu-on-windows-rw-r--r-- 1 root root 105 Jan 30 2020 /etc/lsb-release lrwxrwxrwx 1 root root 21 Jan 30 13:28 /etc/os-release -> ../usr/lib/os-release# cat /etc/*eleaseDISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" NAME="Ubuntu" VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" ...

reset-the-password in ubuntu linux bash in windows
passer par une fenêtre powershell en tant d'admin
PS C:\WINDOWS\system32> ubuntu config --default-user root
ubuntu.... passwd / ou passwd user = mettre un new passwd (1234)
puis remettre le nom par def.
PS C:\WINDOWS\system32> ubuntu config --default-user be4
src: src qastack.fr/ reset-the-password-in-ubuntu-linux-bash-in-windows
testé 02/2022
pour: installer lynx
sudo apt install lynx
... no
sudo apt update
212 pkg can be upgrades
apt list --upgradable
apt install lynx
lynx http://xxxxx.fr = ok now
passer par une fenêtre powershell en tant d'admin
PS C:\WINDOWS\system32> ubuntu config --default-user root
ubuntu.... passwd / ou passwd user = mettre un new passwd (1234)
puis remettre le nom par def.
PS C:\WINDOWS\system32> ubuntu config --default-user be4
src: src qastack.fr/ reset-the-password-in-ubuntu-linux-bash-in-windows

testé 02/2022
pour: installer lynx
sudo apt install lynx
... no
sudo apt update
212 pkg can be upgrades
apt list --upgradable
apt install lynx
lynx http://xxxxx.fr = ok now
be4@indy3:~$ ls -albe4@indy3:~$ more .bashrc-rw------- 1 be4 be4 2872 Jun 11 01:28 .bash_history -rw-r--r-- 1 be4 be4 220 Mar 25 11:04 .bash_logout -rw-r--r-- 1 be4 be4 3879 Mar 25 16:49 .bashrc # changer PS1 de bleu(34)/fond_noir à cyan(36)/fond_noir be4@indy3:~$ echo $PS1if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" ;; *) ;; esac be4@indy3:~$\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ mais toutes les couleurs sont pas terribles! why? ex: "vi" illisible be4@indy3:~$ more .bashrcPS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ ' be4@indy3:~$ echo $PS1# aliases ------------ alias ll='ls -alF' alias llt='ls -altr' alias la='ls -A' alias l='ls -CF' alias cdd='cd /mnt/d/data_html' alias cdbe='cd /mnt/d/data_html/internet/be.free.fr' be4@indy3:/mnt/d/data_html/c# find . -name "*.htm" -exec grep "< nav>" {} \; -print |wc -l 28\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ # find + tar ... No, no ... yesfind . -name "*.htm" -exec grep " erreur si space in name!190 tar -tvf all_gzip_2020-06-18.tar 191 find . -name "*.htm" -mtime 0 -exec tar -rvf out.tar {} \; 192 ls -l out.tar 193 tar -tvf 194 tar -tvf out.tar 195 find . -name "*.htm" -mtime 0 -exec tar -rvf sv_$(date +%Y-%m-%d).tar {} \; 196 tar -tvf out.tar 197 ls -l *.tar 198 rm all_gzip_2020-06-18.tar 199 rm out.tar 200 find . -mtime 0 -exec tar -rvf sv_$(date +%Y-%m-%d).tar {} \; 201 ls -l *.tar 202 rm sv_2020-06-18.tar 203 find . -name "*.gpx" -mtime 0 -exec tar -rvf sv_$(date +%Y-%m-%d).tar {} \; 204 find . -name "*.gpx" -exec tar -rvf sv_$(date +%Y-%m-%d).tar {} \; 205 ls -ltr 206 mv sv_2020-06-18.tar sv_gpx_2020-06-18.tar 207 gzip sv_gpx_2020-06-18.tar 208 ls -ltr *gz 209 find . -name "*.gpx" | xargs tar cfvz sv2_gpx_$(date +%Y-%m-%d).tgz 210 ls -ltr *gz
voir aussi grep (find/tar)