2

I have a windows computer and started learning about git and github and i also downloaded git for windows (GitBash). It supports linux commands also, and i want to use linux commands in GitBash, As i am more comfortable in Linux commands rather than windows commands. SO can i use Linux commands ?

DELL@DESKTOP-N2DUH6T MINGW64 ~
$ cd desktop

DELL@DESKTOP-N2DUH6T MINGW64 ~/desktop
$ ls
'Android Studio.lnk'*
'Eclipse IDE for Java Developers - 2020-12.lnk'*
FINAL450.xlsx
'Internet Download Manager.lnk'*
'MySQL Workbench 8.0 CE.lnk'*
'New Microsoft Word Document.docx'
ayushGitRepos/
desktop.ini
'jai new resume'/
'mass infotech letterhead.docx'
'sublime_text - Shortcut.lnk'*

DELL@DESKTOP-N2DUH6T MINGW64 ~/desktop
$ cd ayushGitRepos

DELL@DESKTOP-N2DUH6T MINGW64 ~/desktop/ayushGitRepos
$ ls
TO-DO-list/

DELL@DESKTOP-N2DUH6T MINGW64 ~/desktop/ayushGitRepos
$ cd  TO-DO-list/

DELL@DESKTOP-N2DUH6T MINGW64 ~/desktop/ayushGitRepos/TO-DO-list (main)
$ ls
README.md  _config.yml  index.html  script.js  style.css

DELL@DESKTOP-N2DUH6T MINGW64 ~/desktop/ayushGitRepos/TO-DO-list (main)
$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

1 Answer 1

3

You can use some bash commands in Windows in GitBash but you can also install Ubuntu on Windows (that in 'on', not 'beside').

You can just get Ubuntu from the Microsoft Store or you can follow the official Canonical's (makers of Ubuntu) Install Ubuntu on Windows 10:

The wonderful Ubuntu terminal is freely available for Windows 10.

As any Linux user knows, it’s the command line terminal where the magic happens. It’s perfect for file management, development, remote administration and a thousand other tasks.

The Ubuntu terminal for Windows has many of the same features you’ll find using the terminal on Ubuntu:

  • Unrivalled breadth of packages, updates and security features
  • Bash, Z-Shell, Korn and other shell environments without virtual machines or dual-booting
  • Run native tools such as SSH, git, apt and dpkg directly from your Windows computer
  • A huge community of friendly, approachable users

You can then either use Ubuntu's terminal or set it up with the new Windows Terminal.

Sign up to request clarification or add additional context in comments.

1 Comment

In 2024 the link is ubuntu.com/desktop/wsl It points to the Microsoft Store, but there are also tutorials lower down.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.