Cygwin Command Cheat Sheet
Cygwin Command Cheat Sheet
The Cygwin Console is a popular command-prompt tool for Windows (also called Cygwin Bash Shell) that mimics a Linux environment to execute your commands. This wikiHow will give you a list of commands you can use in Cygwin. When you initially launch the console, you are automatically sent to your Cygwin home directory, which generally looks like your Windows username. Since Cygwin uses a Linux approach, the Windows backslash(\) becomes the forward-slash(/) instead.
Steps

Cutting and Pasting Content from Windows to Cygwin

Navigate to the content you want to copy in Windows. This can be any application or text from a web page.

Highlight what you want to copy and press Ctrl+C. You can also go to Edit > Copy once you've highlighted what you want to copy.

Go to the Cygwin window and right-click a blank spot. The keyboard shortcut Alt + Tab will allow you to change active windows while right-clicking prompts a menu to pop up.

Hover your mouse over Edit and select Paste. The content you previously copied will paste into the window.

Working with Files

cp . This will create a copy of a file.

cp -R . This code creates a copy of a directory.

mv . This moves or renames a file.

rm . This deletes a file.

Working with Directories

cd . Will change the directory you're currently in.

ls. This lists the files in the current directory.

ls -l. Lists all the files in the current directory as well as their attributes.

mkdir . This creates a new directory.

pwd. This tells you what directory you're in.

Archiving or Extracting Files and Directories

tar -zcvf # create gzipped tar archive of . Pick one of z,c,v,f to execute a command. -z - filter the archive through gzip -c - create a new archive -v - verbosely list files processed -f - use archive file

tar -xvzf # extract tarred, gzipped in current directory. Pick one of x,v,z,f to execute a command. -x - extract files from an archive -v - verbosely list files processed -z - filter the archive through gzip -f - use archive file

What's your reaction?

Comments

https://hapka.info/assets/images/user-avatar-s.jpg

0 comment

Write the first comment for this!