<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikicyber.org/index.php?action=history&amp;feed=atom&amp;title=Draft%3AIntro_to_Bash</id>
	<title>Draft:Intro to Bash - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikicyber.org/index.php?action=history&amp;feed=atom&amp;title=Draft%3AIntro_to_Bash"/>
	<link rel="alternate" type="text/html" href="https://wikicyber.org/index.php?title=Draft:Intro_to_Bash&amp;action=history"/>
	<updated>2026-09-24T04:44:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wikicyber.org/index.php?title=Draft:Intro_to_Bash&amp;diff=166&amp;oldid=prev</id>
		<title>MigrationBot: Backfill (v3.0 review queue): added to the review queue</title>
		<link rel="alternate" type="text/html" href="https://wikicyber.org/index.php?title=Draft:Intro_to_Bash&amp;diff=166&amp;oldid=prev"/>
		<updated>2026-09-22T05:42:38Z</updated>

		<summary type="html">&lt;p&gt;Backfill (v3.0 review queue): added to the review queue&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:42, 22 September 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l98&quot;&gt;Line 98:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 98:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Linux Fundamentals|019]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Linux Fundamentals|019]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Migrated from cypat.guide]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Migrated from cypat.guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Pending review]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikicyber:diff:1.41:old-86:rev-166:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>MigrationBot</name></author>
	</entry>
	<entry>
		<id>https://wikicyber.org/index.php?title=Draft:Intro_to_Bash&amp;diff=86&amp;oldid=prev</id>
		<title>MigrationBot: Import from cypat.guide: docs/linux/linux_fundamentals/intro_bash.md</title>
		<link rel="alternate" type="text/html" href="https://wikicyber.org/index.php?title=Draft:Intro_to_Bash&amp;diff=86&amp;oldid=prev"/>
		<updated>2026-09-18T17:06:15Z</updated>

		<summary type="html">&lt;p&gt;Import from cypat.guide: docs/linux/linux_fundamentals/intro_bash.md&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Submit}}&lt;br /&gt;
&amp;lt;!-- Migrated from https://cypat.guide/docs/linux/linux_fundamentals/intro_bash (source: docs/linux/linux_fundamentals/intro_bash.md) --&amp;gt;&lt;br /&gt;
Author(s): Matthias Lee (ml2322) &amp;lt;br /&amp;gt; Last Updated: 07-02-2025&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
! Recommended Prerequisites (click to expand)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In most Linux operating systems, the terminal runs a program called &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;. This is the command processor, where you interact with the system. Some use other ones like &amp;lt;code&amp;gt;sh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;zsh&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fish&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;dash&amp;lt;/code&amp;gt;. However, since they are mostly similar, this guide will still apply.&lt;br /&gt;
&lt;br /&gt;
=== What am I looking at? ===&lt;br /&gt;
&lt;br /&gt;
When you load the terminal, you are greeted with a prompt like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;user@system:/home/user$&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This tells you who you are, the system name, the current path, and your privileges.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt;: Your username&lt;br /&gt;
* &amp;lt;code&amp;gt;system&amp;lt;/code&amp;gt;: The computer&amp;#039;s hostname&lt;br /&gt;
* &amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;: The current working directory (where you are)&lt;br /&gt;
* &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;: A &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt; at the end signifies you are operating with regular privileges. If you are the root user, however, you will see a &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; instead (don&amp;#039;t worry about this for now).&lt;br /&gt;
&lt;br /&gt;
=== Navigating ===&lt;br /&gt;
&lt;br /&gt;
Using terminal in the same directory isn&amp;#039;t very practical, so learning to navigate to different directories is important.&lt;br /&gt;
&lt;br /&gt;
==== Checking your current directory ====&lt;br /&gt;
&lt;br /&gt;
To see your current directory, you can run &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt; (print working directory), and it will print your full working directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;user@system:/home/user$ pwd&lt;br /&gt;
/home/user&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Changing directories ====&lt;br /&gt;
&lt;br /&gt;
To change your directory, run the &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; command, followed by where you want to go. If you run &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; with no arguments, you will go to your home directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;user@system:/something/else$ cd&lt;br /&gt;
user@system:/home/user$&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;user@system:/home/user$ cd /home/user/Desktop&lt;br /&gt;
user@system:/home/user/Desktop$&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Absolute vs relative paths ====&lt;br /&gt;
&lt;br /&gt;
Absolute paths are paths that start with &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;, meaning they start at the root directory of the system and specify the full path to get to the desired file. This is useful for hardcoding anything, or using something in a completely different set of directories as where you are now.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
However, when running commands or changing directories, it&amp;#039;s not always necessary to specify the full path from the root directory (/). Often, you can specify just a relative path, which is the path to a file or folder from where you are now. For example, if you are in &amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt; and want to get to &amp;lt;code&amp;gt;/home/user/Desktop&amp;lt;/code&amp;gt;, you don&amp;#039;t actually have to specify that full path, you can just run &amp;lt;code&amp;gt;cd Desktop&amp;lt;/code&amp;gt;. Or, if you want to access a subfolder in &amp;lt;code&amp;gt;Desktop&amp;lt;/code&amp;gt;, you can just do &amp;lt;code&amp;gt;cd Desktop/subfolder&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;user@system:/home/user$ cd Desktop&lt;br /&gt;
user@system:/home/user/Desktop$&lt;br /&gt;
user@system:/home/user/Desktop$ cd subfolder/important_files&lt;br /&gt;
user@system:/home/user/Desktop/subfolder/important_files$&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Additionally, if you need to go back a directory, you can use the &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; shortcut. &amp;lt;code&amp;gt;..&amp;lt;/code&amp;gt; means parent directory, which means you can &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; to it to go back, or use it in a relative path to go somewhere else.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;user@system:/home/user/Desktop/subfolder$ cd ..&lt;br /&gt;
user@system:/home/user/Desktop$ cd ../Documents&lt;br /&gt;
user@system:/home/user/Documents&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Another handy trick is that &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; at the start of the path signifies your home directory. For example, you can &amp;lt;code&amp;gt;cd ~&amp;lt;/code&amp;gt; to go to the home directory, or you can specify &amp;lt;code&amp;gt;~/Desktop/file.txt&amp;lt;/code&amp;gt; or something similar in a command instead of needing to write &amp;lt;code&amp;gt;/home/user/Desktop/file.txt&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Passing arguments ===&lt;br /&gt;
&lt;br /&gt;
When you run a command, you can pass arguments in it to make it do specific things. Arguments are different per command, but there are general rules for how you have to pass them.&lt;br /&gt;
&lt;br /&gt;
==== Spaces ====&lt;br /&gt;
&lt;br /&gt;
Arguments are separated by a whitespace (&amp;amp;quot; &amp;amp;quot; or a new line). For example: &amp;lt;code&amp;gt;a_command arg_1 arg_2&amp;lt;/code&amp;gt;. If you need to pass a space in the argument, however, you have two options. You can escape the space by preceding it by a backslash (&amp;lt;code&amp;gt;arg with space&amp;lt;/code&amp;gt; becomes &amp;lt;code&amp;gt;arg\ with\ space&amp;lt;/code&amp;gt;), or you can put the whole thing in quotes (&amp;lt;code&amp;gt;&amp;amp;quot;arg with space&amp;amp;quot;&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
==== Special characters ====&lt;br /&gt;
&lt;br /&gt;
Certain characters have special meanings in bash, such as &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt;, and some others. If you need to use these characters, you can escape them by preceding them with a backslash, just like with spaces. Example: (&amp;lt;code&amp;gt;$a&amp;lt;/code&amp;gt; does not work as expected, but &amp;lt;code&amp;gt;\$a&amp;lt;/code&amp;gt; does).&lt;br /&gt;
&lt;br /&gt;
==== Flags ====&lt;br /&gt;
&lt;br /&gt;
Many commands don&amp;#039;t just take arbitrary input; they use flags to modify behavior. Flags are arguments that usually look like &amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--example&amp;lt;/code&amp;gt;. Usually, you can find information on what flags exist and what they do by specifying &amp;lt;code&amp;gt;--help&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Basic commands ===&lt;br /&gt;
&lt;br /&gt;
Here are some basic commands you can use in almost all Linux systems:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ls &amp;amp;lt;dir&amp;amp;gt;&amp;lt;/code&amp;gt;: This command lists everything in the directory you specify (&amp;lt;code&amp;gt;&amp;amp;lt;dir&amp;amp;gt;&amp;lt;/code&amp;gt;). If you don&amp;#039;t specify one, it will list everything in your current directory.&lt;br /&gt;
* &amp;lt;code&amp;gt;cat &amp;amp;lt;files&amp;amp;gt;&amp;lt;/code&amp;gt;: This command prints the content of every file you specify. You can specify several files, and it will concatenate them and print the result.&lt;br /&gt;
* &amp;lt;code&amp;gt;echo &amp;amp;lt;text&amp;amp;gt;&amp;lt;/code&amp;gt;: This just prints out whatever text you specify. Echo is unique in that if you specify several arguments, it will just print everything you specify.&lt;br /&gt;
* &amp;lt;code&amp;gt;mv &amp;amp;lt;old_file&amp;amp;gt; &amp;amp;lt;new_file&amp;amp;gt;&amp;lt;/code&amp;gt;: The &amp;lt;code&amp;gt;mv&amp;lt;/code&amp;gt; command moves or renames the first file (&amp;lt;code&amp;gt;&amp;amp;lt;old_file&amp;amp;gt;&amp;lt;/code&amp;gt;) to the new file (&amp;lt;code&amp;gt;&amp;amp;lt;new_file&amp;amp;gt;&amp;lt;/code&amp;gt;). If the new file is the path to a directory, it will keep the file name but put it in that directory. Otherwise, it will rename it to whatever you set.&lt;br /&gt;
* &amp;lt;code&amp;gt;rm &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;: The &amp;lt;code&amp;gt;rm&amp;lt;/code&amp;gt; command deletes the file specified. It allows the &amp;lt;code&amp;gt;-r&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-f&amp;lt;/code&amp;gt; flags, which remove recursively (for deleting directories) and remove forcefully (for write protected files) respectively.&lt;br /&gt;
* &amp;lt;code&amp;gt;gedit &amp;amp;lt;file&amp;amp;gt;&amp;lt;/code&amp;gt;: This command opens the specified file in &amp;lt;code&amp;gt;gedit&amp;lt;/code&amp;gt;, the default GUI text editor for Ubuntu. Some other distros may have a different editor, so this may not always work.&lt;br /&gt;
* &amp;lt;code&amp;gt;whoami&amp;lt;/code&amp;gt;: This will just return your username.&lt;br /&gt;
&lt;br /&gt;
=== Some other tips ===&lt;br /&gt;
&lt;br /&gt;
* You can use the up and down arrow keys to navigate through your recent commands; to run your last command again, just hit the up arrow and it will come back.&lt;br /&gt;
* &amp;lt;code&amp;gt;CTRL+A&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CTRL+E&amp;lt;/code&amp;gt; move the cursor to the beginning and end of the command respectively. This is useful if you don&amp;#039;t have Home and End on your keyboard.&lt;br /&gt;
* You can hit Tab to autocomplete a command or file path so you don&amp;#039;t have to type the whole thing.&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux Fundamentals|019]]&lt;br /&gt;
[[Category:Migrated from cypat.guide]]&lt;/div&gt;</summary>
		<author><name>MigrationBot</name></author>
	</entry>
</feed>