把windows的cmd变成bash

2:07:00 PM 0 Comments





首先,建立一个文件c:\windows\system32\bash.cmd


内容为:


@cls

@echo off

prompt wdw@linux $$

doskey ls=dir $*

doskey pwd=cd $*

doskey mkdir=md $*

doskey rmdir=rd $*

doskey rm=del $*

doskey mv=move $*

doskey cp=copy $*

doskey cat=type $*

doskey clear=cls $*

doskey uname=ver

doskey id=whoami

doskey w=quser

@echo on




然后在注册表里找到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor


修改其下键值AutoRun=c:\windows\system32\bash.cmd


此处c:\windows\system32可以修改为任意你存放.cmd文件的路径。


Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.