Windows Basic Command

June Chung
Dec 10, 2020

--

  • How to check ports running (used ports)
    netstat -ab
  • Cp command
    copy DIRECTORY/filename DIRECTORY/tofilename
  • View file (=cat)
    type <filename>
  • Set environment variable (export $XXX)
    for /f %i in (<command>, output) do setx RELEASE_VERSION=%i /M
  • 2 commands at once
    - IF you want to run it tgt (without sequence)
    : <command> & <command>
    - IF you want to run it with sequence (Dependency)
    : <command> && <command>
  • How to redirect/configure IP tables
    <OPEN FIREWALL>
    : netsh advfirewall firewall add rule name=”HTTPS port” dir=in action=allow protocol=TCP localport=443
    <REDIRECT TRAFFIC>
    : netsh interface portproxy add v4tov4 listenport=443 connectport=8080 connectaddress=127.0.0.1

--

--