6626070
2997924

PL00, Windows

Back to the previous pagepage management
List of posts to read before reading this article


Contents


Basic

URL
Command help

help
[command] /?




alias command

doskey [alias] = [window_command]
enroll command

URL
Step 1
creat .bat file

vim autorun.bat


Step 2
fill out contents in .bat file

@ECHO OFF

doskey ls = dir

@echo activate linux command.


Step 3
enter registry

regedit


Step 4
at edit path : \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor
set name and path image






Background

start "" [program_name]




Fix File Associations

assoc [file_name]
You can view all the file associations your computer knows about by typing ASSOC in the command window. You’ll see the file extension and the program it’s associated with.




System Information

systeminfo




Turn Off Computer

shutdown
shutdown/i




Check Disk

chkdsk




Schedule Tasks

schtasks




Clear the terminal screen

cls
clrscr

Current date, time

echo %date% %time%




Shell script : .bat

URL, URL2

@echo off

[code]

@echo [contents]
#pause




for

.bat

@echo off

for /l %%i in (1,1,50) do (
	echo %%i
)

@echo success





Environment variable

display path URL

set            # all env-variable
echo %PATH%    # all env-variable : path
path           # all env-variable : path

reg query HKEY_CURRENT_USER\Environment    # user env-variable
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"   # system env-variable




set path URL 1, URL 2, URL 3, URL 4

Caution : you should require permission for admin
setx path "%PATH%;[path]"        # all env-variable path

setx [user_env_variable] "[path]"           # user env-variable
setx [system_env_variable] "[path]" -m      # system env-variable




path recovery

regedit

> HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\Enviroment\Path





Folder and Files

change directory

cd [path]
cd %homepath%
cd ../




Files list

dir
dir /a : search including hidden things
dir /s : search up to subdirectories




Show File

type [file_name]




Rename

rename [old_file_name] [new_file_name]
rename [old_folder_name] [new_folder_name]




move

move [file_name] [folder_name]




File, Create and Deleting

type NUL > [file_name]                                    : make file of size 0
del [file_name]                                           : delete file




Folder, Create and Deleting

mkdir [folder_name]                            : make folder
rmdir /s [folder_name]                         : delete folder




File, Copy

copy [file_name] [copy_path]




Folder, Copy

xcopy /?       : parameters
xcopy [folder_name_including_path] [copy_path] /e /h /k





wget

wget download C:\Windows\System32

wget [link]

example

mklink [[/D] | [/H] | [/J]] Link Target

versus Linux

linux

$ ln -s Target Link

windows

mklink /D Link Target

backup


[Users]
robocopy C:\Users D:\Users /E /COPYALL /XJ
rd /q/s C:\Users
mklink /D C:\Users D:\Users

[Program Files]
robocopy "C:\Program Files" "D:\Program Files" /E /COPYALL /XJ
rd /q/s "C:\Program Files"
mklink /D "C:\Program Files" "D:\Program Files"

[Program Files (x86)]
robocopy "C:\Program Files (x86)" "D:\Program Files (x86)" /E /COPYALL /XJ
rd /q/s "C:\Program Files (x86)"
mklink /D "C:\Program Files (x86)" "D:\Program Files (x86)"

[ProgramData]
robocopy "C:\ProgramData" "D:\ProgramData" /E /COPYALL /XJ
rd /q/s "C:\ProgramData"
mklink /D "C:\ProgramData" "D:\ProgramData"




Configuration

regedit

image C:\Users\[user]\autorun.bat

@ECHO OFF

doskey gitlog = git log --all --graph --oneline
doskey workd = mkdir %date%
doskey workt = type NUL > %time%.py

doskey ls = dir
doskey cat = type $1


doskey grep = find $1 $2
doskey mv = ren $
doskey rm = del $


::doskey = c:\Users\userd\batch_file\dyk_.bat 
doskey dyk = c:\Users\userd\batch_file\dyk.bat
doskey dyk_paper = c:\Users\userd\batch_file\dky_paper.bat


::doskey  = start firefox  
::doskey = c:\Users\userd\batch_file\fdyk_.bat 
doskey fdyk_autorun = start firefox https://github.com/userdyk-github/userdyk-github.github.io/edit/master/_posts/PL00/2019-08-13-PL00-Windows.md
doskey fdyk_paper = start firefox https://userdyk-github.github.io/research/PAPER-REVIEW.html 
doskey fdyk_papers = c:\Users\userd\batch_file\fdyk_papers.bat 

@echo activate customized command.





Disk

URL

diskpart
list disk
select disk [number]
clean
create partition primary
format fs=ntfs quick
exit





Network

connect wifi

ipconfig               : IP Configuration
netstat                : Network Statistics




OpenSSH

After installing openssh client

ssh -p [port_num] [account]@[ip_address]

Execute

where : searches the PATH for the executable

where [command]




control pannel

calc
control
cmd
explorer
mspaint
notepad




background

start [command]      # execute on background
start                # new cmd
start .              # execute current explorer

web brower

start chrome google.com
start firefox google.com





Docker

docker download




WSL, Windows Subsystem for Linux

setup 1, setup 2
~/.bashrc

export PATH="/mnt/c/Windows/:$PATH"
$ source .bashrc
$ cmd.exe /c [file_name.bat]




Windows Terminal


CUDA

cuda downloads



Python

download

python download, anaconda
python PATH : C:\Users\Administrator\AppData\Local\Programs\Python\Python38\
pip PATH : C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts\




python package manager

esay_install pip




virtual environment

URL

pip install virtualenv
python -m venv [venv_name]          # virtualenv [venv_name]
[venv_name]\Scripts\activate.bat    # activate
deactivate                          # deactivate




package management

pip freeze > requirements.txt
pip install -r requirements.txt
pip uninstall -r requirements.txt





Python Editor

ATOM editor

shortcut

shortcut description
ctrl+|  
ctrl+, settings
ctrl+k+arrow split to direction of arrow
ctrl+k+ctrl+arrow put focus on window
ctrl+n new window
ctrl+w close window




package

  • autocomplete-python
  • script : ctrl + shift + b
  • minimap
  • vim-mode-plus
  • ex-mode

url
ctrl+,:open config folder, config.cson

"autocomplete-plus":
  suppressActivationForEditorClasses: [
    "vim-mode-plus.normal-mode"
    "vim-mode-plus.visual-mode"
    "vim-mode-plus.operator-pending-mode"
    "vim-mode-plus.insert-mode.replace"
  ]

latex

URL TeX Live

compile : ctrl + alt + b
clean : ctrl + alt + c




atom deletion

  • C:\Users<user name>.atom : setup, packages
  • C:\Users<user name>\AppData\Local\atom : applications
  • C:\Users<user name>\AppData\Roaming\Atom : cache

VS code editor

download

shortcut

shortcut description
ctrl+, settings
ctrl+k+s keyboard shortcut
ctrl+shift+x extension
ctrl+shift+n new folder
ctrl+shift+p select interpreter
ctrl+(~) focus on terminal
ctrl+shift+e focus on side bar
ctrl+b hide side bar




Custom shortcuts : ctrl + k + s
When you serach keybinding, put keymap in double quotes(example, type “ctrl + b”)

default user
View: Show Explorer Alt + 1
View: Toggle Side Bar Visiblity shift+escape
workbench.action.toggleEditorWidths ctrl + shift + ‘

package

  • vim
  • python
  • jupyter
  • remote development |Configuration, ssh key file
    • F1 > remote ssh connect to host > id@ip:port > password
Reference : generate rsa key after installation of remote development

client : on PowerShell

ssh-keygen -t rsa -b 4096

id_rsa, id_rsa.pub

server : After copy content of id_rsa.pub on windows, paste it into ~/.ssh/authorized_keys on server(ex, linux)
~/.ssh/authorized_keys

$ vim ~/.ssh/authorized_keys

wsl

/mnt/c/

$ code .





Jupyter

Installation

notebook : URL

$ pip install notebook
$ conda install -c conda-forge notebook
$ jupyter notebook




lab : URL

$ pip install jupyterlab
$ conda install -c conda-forge jupyterlab
$ jupyter lab




remote jupyter server connection throught ssh

$ ssh -p [server port 1] -NfL localhost:[local port]:localhost:[server port 2] [id]@[server ip]




notebook extention

GUI-based
Jupyter Nbextensions

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user

image

  • Select CodeMirror Keymap




CLI-based
nbtutor
URL
pip

$ pip install nbtutor
$ jupyter nbextension install --overwrite --py nbtutor
$ jupyter nbextension enable --py nbtutor

conda

$ conda install -c conda-forge nbtutor
%load_ext nbtutor
%%nbtutor




lab extention

CLI-based

:: Jupyter Lab Extensions Package
pip install nodejs
conda install --yes nodejs
conda install -c conda-forge --yes nodejs

:: Table of Contents
jupyter labextension install @jupyterlab/toc

:: Shortcut UI
jupyter labextension install @jupyterlab/shortcutui

:: Variable Inspector
jupyter labextension install @lckr/jupyterlab_variableinspector

:: Go to Definition of Module
jupyter labextension install @krassowski/jupyterlab_go_to_definition

:: Interactive Visualization
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install lineup_widget

:: Connection to Github
jupyter labextension install @jupyterlab/github

:: CPU+RAM Monitor
pip install nbresuse
jupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor

:: File Tree Viewer
jupyter labextension install jupyterlab_filetree

:: Download Folder as Zip File
conda install --yes jupyter-archive
jupyter lab build
jupyter labextension update --all




debug
URL

# https://github.com/nodesource/distributions/blob/master/README.md
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt-get install -y nodejs

$ jupyter labextension install @jupyterlab/debugger
$ conda install xeus-python -c conda-forge





Pycharm editor

downloadusage

shortcut

basic

shortcut description
ctrl+alt+s settings
shift+esc undo(1)
shift+f12 undo(2)
alt+shift+f10 run(1)
ctrl+shift+f10 run(2)
shift+f10 run(3)
alt+F12 terminal
alt+insert add file
alt+1 structure(1) : working directory
alt+7 structure(2)
ctrl+h structure(3)
alt+f7 structure(4)
alt+e+f+f searching(1)
ctrl+shift+f searching(2)
shift+shift or ctrl+shift+a searching(3)
F12 move focusing pannel
shift+F12 clear all except text editor

focus edit image image

edit

shortcut description
alt+j a word selection
ctrl+shift+alt+j all specific word selection
ctrl+w  
ctrl+ctrl multi focus
ctrl+numpad-,+  
ctrl+alt+numpad-,+ code fold, unflod (2)
ctrl+shift+numpad-,+ code fold, unflod (3)
ctrl+arrow move focusing unit of word
alt+up,down move focusing unit of method
ctrl+home,end,pgup,pgdn move focusing unit of page
ctrl+backspace delete unit of word
F2 error line move
shift+F2 error line back move
ctrl+b move to declare part
ctrl+u  
ctrl+[,] use with ctrl+m
ctrl+shift+[,]  
ctrl+g move that i want to do line

reference

shortcut description
ctrl+F7 use with ctrl+l
alt+F7  
ctrl+alt+up,down  
ctrl+alt+F7  
ctrl+f in the file
ctrl+f in the project

debugging

shortcut description
alt+shift+e run one line
ctrl+F8 set break points
shift+F9 enter into first break point on debugging mode
alt+shift+F7 next step into only in my code script
F7 next step into
shift+F8 back to origin
F8 next step over
alt+w watch variables
alt+F8 evaluation
F9 next break point
alt+F9 additional break point with cursor
ctrl+F2 exit debugging mode

useful tips

shortcut description
F11 bookmark
ctrl+F11 sequential bookmark
shift+F11 bookmark popup
alt+2 bookmark menu




package

market place

  • IdeaVim
  • Translator
  • CodeGlance
  • TabMover
  • BashSupport
  • MultiHighlight




setup

terminal, wsl 그림1




interpreters




remote server

Setup remote server

  • Ctrl+Alt+S > Tools > SSH Configurations
  • Ctrl+Alt+S > Build, Execution, Deployment > Deployment > Connection, Mappings
    • Connection : set Root path
    • Mappings : set Local path, Deployment path
  • Ctrl+Alt+S > Project : Python Interpreter > add > SSH Interpreter > Existing Interpreter
  • Ctrl+Alt+S > Tools > SSH Terminal > SSH Configuration
  • Ctrl+Alt+S > keymap > Main menu > Tools > Deployment > Browe Remote Host : Alt + R
  • Ctrl+Alt+S > keymap > Tool Windows > File Transfer(log) : Alt + T
  • Run > Edit Configurations
    • Environment variables
      • LB_LIBRARY_PATH=/usr/local/cuda-10.2/lib64

File upload

  • upload file(from local to remote server) : ctrl+alt+shift+x
  • file transfer log : Alt + T

Jupyter notebook on remote server

  • jupyter server
$ ssh -p [server port 1] -NfL localhost:[local port]:localhost:[server port 2] [id]@[server ip]






R Editor

RStudio

R studio in wsl
install

$ sudo apt-get update
$ sudo apt-get upgrade -y

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/Linux/ubuntu focal-cran40/'
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

$ sudo apt install -y r-base r-base-core r-recommended r-base-dev gdebi-core build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev

$ wget https://rstudio.org/download/latest/stable/server/bionic/rstudio-server-latest-amd64.deb
$ sudo gdebi rstudio-server-latest-amd64.deb

execute : http://localhost:8787

$ sudo rstudio-server start
$ sudo rstudio-server stop
PORT

port change
/etc/rstudio/rserver.conf

www-port=80
$ sudo rstudio-server restart

uninstall

$ sudo apt-get remove rstudio-server -y





Emulator

cygwin

dowonload

cygwin downloadanaconda

# wget, tmux, vim, git, python, pip

$ wget raw.github.com/transcode-open/apt-cyg/master/apt-cyg
$ chmod +x apt-cyg
$ mv apt-cyg /usr/local/bin 

$ apt-cyg install python3
$ apt-cyg install python3-pip
apt-cyg

apt-cyg github

$ apt-cyg install 	# to install packages
$ apt-cyg remove 	# to remove packages
$ apt-cyg update	# to update setup.ini
$ apt-cyg show		# to show installed packages
$ apt-cyg find 		# to find packages matching patterns
$ apt-cyg describe 	# to describe packages matching patterns
$ apt-cyg packageof 	# to locate parent packages





putty

dowonload

putty download





conemu

dowonload

conemu download


Connect with Putty

image image image




set Korean

image restart!




shortcut keys

conemu shortcut

image default short cut keys

key description
win+A pause
win+alt+p settings
alt+enter full screen
ctrl+shift+e vertical split
ctrl+shift+o horizental split
win + alt + p : shortcut Customizing

그림1






Web brower

Chrome

plugins


Firefox

plugins





Edge

plugins





Utils





List of posts followed by this article


Reference


OUTPUT