tag:blogger.com,1999:blog-53564509896453598392024-02-17T21:05:02.378-08:00Nothing but LinuxSomething back to community.Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.comBlogger140125tag:blogger.com,1999:blog-5356450989645359839.post-26269409469712990462023-04-26T00:02:00.002-07:002023-04-26T00:02:29.174-07:00Linux KVM hypervisor a beginners guide<p> Linux KVM. KVM is a virtualization technology for Linux that allows you
to create and run virtual machines (VMs) on a Linux host.</p><p><br /></p><p>Before we begin, make sure that you have a Linux machine with KVM
installed. You can install KVM on Ubuntu or Debian with the following
command:</p><p>sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager</p><div><br /></div><div>For Red Hat-based systems, you can use the following command:</div><div><br /></div><div><div>sudo yum install qemu-kvm libvirt bridge-utils virt-manager</div></div><div><br /></div><div><br /></div><div>Once you have KVM installed, you can start creating VMs.</div><div><br /></div><div><h2>Creating a Virtual Machine</h2></div><div>You can create a VM using the <code>virt-install</code> command. Here is an example command:</div><div><br /></div><div><div>sudo virt-install \</div><div>--name my-vm \</div><div>--ram 2048 \</div><div>--vcpus 2 \</div><div>--disk path=/var/lib/libvirt/images/my-vm.qcow2,size=10 \</div><div>--os-type linux \</div><div>--os-variant ubuntu20.04 \</div><div>--network bridge=virbr0 \</div><div>--graphics none \</div><div>--console pty,target_type=serial \</div><div>--location 'http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/'</div></div><div><br /></div><div><br /></div><div><p>This command creates a VM named <code>my-vm</code> with 2 vCPUs and 2GB of RAM. The VM has a 10GB disk and uses the Ubuntu 20.04 operating system. The VM is connected to a virtual bridge named <code>virbr0</code> and has no graphics output. The console output is redirected to a serial port. Finally, the VM is installed from an Ubuntu 20.04 installation ISO available at the given URL.</p><p>You can adjust the parameters of this command to suit your needs. For example, you can change the name of the VM, the amount of RAM and vCPUs, the disk size and location, and the network settings.</p><p><br /></p><h2>Starting and Stopping a Virtual Machine</h2></div><div>To start a VM, use the <code>virsh start</code> command followed by the name of the VM:</div><div><br /></div><div><div>sudo virsh start my-vm</div></div><div><br /></div><div>To stop a VM, use the <code>virsh shutdown</code> command followed by the name of the VM:</div><div><br /></div><div><div>sudo virsh shutdown my-vm</div></div><div><br /></div><div><br /></div><div><h2>Listing Virtual Machines</h2></div><div>To list all the VMs on your system, use the <code>virsh list</code> command:</div><div><br /></div><div><div>sudo virsh list --all</div></div><div><br /></div><div>This command lists all the running and stopped VMs on your system.</div><div><br /></div><div><h2>Managing Virtual Machines with Virt-Manager</h2></div><div>Virt-Manager is a graphical user interface for managing virtual
machines. To start Virt-Manager, type the following command in a
terminal:</div><div><br /></div><div><div>virt-manager</div></div><div><br /></div><div><br /></div><div><p>This command opens the Virt-Manager window, where you can view and manage your VMs.</p><p>To create a new VM using Virt-Manager, click the <code>Create a new virtual machine</code> button in the toolbar. This opens a wizard that guides you through the process of creating a new VM.</p><h2>Conclusion</h2><p>In this tutorial, we have covered the basics of creating, starting, and stopping virtual machines using KVM on Linux. We have also covered some of the CLI commands and configuration examples for managing virtual machines. With this knowledge, you can start using KVM to create and manage virtual machines on your Linux host.</p><p><br /></p></div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-81318400693098253812023-04-15T23:14:00.003-07:002023-04-15T23:19:37.299-07:00How to remove (^M) characters from a file in Linux<p>The control characters "^M" in a text file are actually the line endings
used by Windows/DOS operating systems. These characters can cause
issues when you try to use the file in Linux. Fortunately, it is easy to
remove them using the tr command</p><p><b>tr -d '\r' < original_file.txt > new_file.txt</b></p><div><br /></div><div>That's it! This is a quick and simple way to remove the control characters "^M" from a text file in Linux.</div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-6423868175821257442023-04-15T05:29:00.001-07:002023-04-15T05:29:18.547-07:00Using the find -exec Command Option<p> The <code>-exec</code> option allows you to execute a command on each file or directory that matches the search criteria specified with the <code>find</code> command.</p><p>Here are some examples of using the <code>-exec</code> option with the <code>find</code> command:</p><p><b>1. Delete all files with a certain extension:</b></p><p>You can use the <code>-exec</code> option with the <code>rm</code> command to delete all files with a certain extension. For example, to delete all files with the extension <code>.log</code> in the current directory and its subdirectories, use the following command:</p><p>find . -name "*.log" -type f -exec rm {} \;</p><div><br /></div><div><b>2. Change the ownership of files:</b></div><div><br /></div><div>You can use the <code>-exec</code> option with the <code>chown</code> command to change the ownership of files. For example, to change the ownership of all files with the extension <code>.txt</code> to the user <code>john</code> in the current directory and its subdirectories, use the following command:</div><p>find . -name "*.txt" -type f -exec chown john {} \;</p><div><br /></div><div><b>3. Compress all files in a directory:</b></div><div><br /></div><div>You can use the <code>-exec</code> option with the <code>gzip</code>
command to compress all files in a directory. For example, to compress
all files in the current directory and its subdirectories, use the
following command:</div><div><br /></div><div><div>find . -type f -exec gzip {} \;</div></div><div><br /></div><div><br /></div><div><b>4. Copy files to another directory:</b></div><div><br /></div><div>You can use the <code>-exec</code> option with the <code>cp</code> command to copy files to another directory. For example, to copy all files with the extension <code>.txt</code> to the directory <code>/home/user/documents</code>, use the following command:</div><div><br /></div><div><div>find . -name "*.txt" -type f -exec cp {} /home/user/documents \;</div></div><div><br /></div><div><br /></div><div><b>5. Rename files with a certain pattern:</b></div><div><br /></div><div>You can use the <code>-exec</code> option with the <code>mv</code> command to rename files with a certain pattern. For example, to rename all files with the extension <code>.txt</code> to have the extension <code>.doc</code> in the current directory and its subdirectories, use the following command:</div><div><br /></div><div><div>find . -name "*.txt" -type f -exec mv {} {}.doc \;</div></div><div><br /></div><div><br /></div><div>These are just a few examples of the many ways you can use the <code>-exec</code> option with the <code>find</code> command to execute commands on files or directories that match your search criteria.</div><div><br /></div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-13904460566885220362023-04-15T05:25:00.000-07:002023-04-15T05:25:16.870-07:00Practical examples of Linux Find command <p>The <code>find</code> command in Linux is a powerful utility used to
search for files and directories in a given directory hierarchy. It is a
command-line tool that offers many options to filter and refine the
search results.</p><p><br /></p><p>Here's a step-by-step guide on how to use the <code>find</code> command with examples for various switches:</p><p><br /></p><p><b>1. Basic usage</b></p><p>The basic usage of the <code>find</code> command is as follows:</p><p>find /path/to/search -name "filename"</p><div><br /></div><div><p>This command searches for files with the given name in the specified path.</p><p>Example: To find all files named <code>example.txt</code> in the current directory and its subdirectories, use the following command:</p><p>find . -name "example.txt"</p></div><div><br /></div><div><b>2. Search by file type</b></div><p>You can use the <code>-type</code> option to search for files of a specific type.</p><p>Example: To find all directories in the current directory and its subdirectories, use the following command:</p><p><br /></p><p>find . -type d</p><div>To find all files in the current directory and its subdirectories, use the following command:</div><div><br /></div><div><div>find . -type f</div></div><div><br /></div><div><br /></div><div><b>3. Search by file size</b></div><p>You can use the <code>-size</code> option to search for files of a specific size. The size can be specified in bytes, kilobytes, megabytes, or gigabytes.</p><p>Example: To find all files in the current directory and its subdirectories that are larger than 1 MB, use the following command:</p><p>find . -size +1M</p><div><br /></div><div><b>4. Search by modification time</b></div><div><br /></div><div><p>You can use the <code>-mtime</code> option to search for files based on their modification time. The time can be specified in days.</p><p>Example: To find all files in the current directory and its subdirectories that have been modified within the last 7 days, use the following command:</p><p>find . -mtime -7</p><p><br /></p><p><b>5. Search by user or group</b></p><div><p>You can use the <code>-user</code> and <code>-group</code> options to search for files owned by a specific user or group.</p><p>Example: To find all files in the current directory and its subdirectories that are owned by the user <code>john</code>, use the following command:</p><p>find . -user john</p><div><br /></div><div>To find all files in the current directory and its subdirectories that are owned by the group <code>developers</code>, use the following command:</div><div><br /></div><div><div>find . -group developers</div><div><br /></div><div><br /></div><div><b>6. Search by permissions:</b></div></div><div><p>You can use the <code>-perm</code> option to search for files based on their permissions.</p><p>Example: To find all files in the current directory and its subdirectories that have read and write permissions for the owner and read permissions for others, use the following command:</p><p>find . -perm 644</p><p><br /></p><p><b>7. Search by name with wildcard:</b></p></div><div><p>You can use the <code>*</code> and <code>?</code> characters as wildcards to search for files with a pattern in their name.</p><p>Example: To find all files in the current directory and its subdirectories that have the word <code>example</code> in their name, use the following command:</p></div><p>find . -name "*example*"</p><p><br /></p><p><b>8. Search by exclusion:</b></p></div><div><p>You can use the <code>!</code> character to exclude files or directories from the search results.</p><p>Example: To find all files in the current directory and its subdirectories that are not named <code>example.txt</code>, use the following command:</p><p>find . ! -name "example.txt"</p></div></div><div><br /></div><div>These are just a few examples of the many options available with the <code>find</code> command in Linux. By combining these options, you can perform complex searches to locate the files or directories you need.</div><div><br /></div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-57450333202787093112023-04-15T05:13:00.000-07:002023-04-15T05:13:25.956-07:00Understanding the Linux dd Command<p>The dd command stands for "data duplicator" and is used for copying and
converting data. The command operates at the block level, meaning that
it copies data block by block, rather than file by file. This allows you
to copy or manipulate data at a low level, which can be useful in
certain situations.</p><p><br /></p><h2>Syntax</h2><p>The basic syntax of the dd command is as follows:</p><p>dd if=input-file of=output-file [options]</p><div><br /></div><div>Here, "if" stands for "input file," and "of" stands for "output file."
You can specify any file as the input or output file, including disks
and partitions.</div><div><br /></div><div><h2>Common Uses</h2></div><div><br /></div><div><h3>1. Creating a Bootable USB Drive</h3><p>One of the most common uses of the dd command is to create a bootable USB drive. To do this, you'll need an ISO file of the operating system you want to install, as well as a USB drive with enough space to hold the ISO file. Here's the command to create a bootable USB drive using dd:</p><p><br /></p><p>dd if=/path/to/iso_file.iso of=/dev/sdb bs=4M status=progress && sync</p></div><div><br /></div><div>Here, /path/to/iso_file.iso is the path to the ISO file you want to
copy, and /dev/sdb is the path to the USB drive you want to copy it to.
Note that you should replace /dev/sdb with the path to your own USB
drive.</div><div><br /></div><div><h3>2. Cloning a Disk</h3></div><div>Another common use of the dd command is to clone a disk. This can be
useful if you want to create a backup of a disk or copy the contents of
one disk to another. Here's the command to clone a disk using dd:</div><div><br /></div><div><div>dd if=/dev/sda of=/dev/sdb bs=4M status=progress && sync</div></div><div><br /></div><div>Here, /dev/sda is the path to the disk you want to clone, and /dev/sdb
is the path to the destination disk. Again, make sure you replace
/dev/sda and /dev/sdb with the paths to your own disks.</div><div><br /></div><div><br /></div><div><h3>3. Erasing a Disk</h3></div><div>You can also use the dd command to erase the contents of a disk. This
can be useful if you want to securely wipe a disk before selling or
disposing of it. Here's the command to erase a disk using dd:</div><div><br /></div><div><div>dd if=/dev/zero of=/dev/sda bs=4M status=progress && sync</div></div><div><br /></div><div><br /></div><div>Here, /dev/zero is a special file in Linux that contains only zeros, and
/dev/sda is the path to the disk you want to erase. This command
overwrites the entire disk with zeros, effectively erasing all data on
the disk.</div><div><br /></div><div><br /></div><h3 style="text-align: left;">4. Checking Disk I/O</h3><p>You can use the <code>dd</code> command to check the input/output (I/O) performance of a disk. To do this, you can create a large file on the disk and then read it back to measure the disk's read speed. Here's the command to do that:</p><p><br /></p><p>dd if=/dev/zero of=testfile bs=1M count=1000 conv=fdatasync</p><div><br /></div><div>This command creates a 1GB file called "testfile" filled with zeros on the disk. The <code>conv=fdatasync</code> option ensures that the data is written to disk immediately. You can then read the file back to measure the disk's read speed:</div><div><br /></div><div><div>dd if=testfile of=/dev/null bs=1M count=1000</div></div><div><br /></div><div>This command reads the "testfile" from the disk and discards the output by writing it to <code>/dev/null</code>. The <code>bs=1M</code> option sets the block size to 1MB, and the <code>count=1000</code> option reads 1000 blocks of 1MB each</div><div><br /></div><div>The output of the second <code>dd</code> command will show you the read
speed of the disk. You can use this technique to check the write speed
of the disk by reversing the <code>if</code> and <code>of</code> options in the commands.</div><div><br /></div><div><br /></div><div><h3>5. Checking Disk Throughput</h3></div><div>You can also use the <code>dd</code> command to measure the throughput
of a disk. To do this, you can create a large file on the disk and then
measure the time it takes to write or read the file. Here's an example</div><div><br /></div><div><div>dd if=/dev/zero of=testfile bs=1M count=1000 conv=fdatasync</div></div><div><br /></div><div>This command creates a 1GB file called "testfile" filled with zeros on
the disk, just like in the previous example. You can then measure the
time it takes to read or write the file using the <code>time</code> command:</div><div><br /></div><div><div>time dd if=testfile of=/dev/null bs=1M count=1000</div></div><div><br /></div><div><p>This command reads the "testfile" from the disk and discards the output, just like in the previous example. The <code>time</code> command shows you the elapsed time, user CPU time, and system CPU time taken by the <code>dd</code> command.</p><p>You can use this technique to measure the throughput of the disk for both reading and writing operations. By dividing the size of the file by the elapsed time, you can calculate the throughput in bytes per second, kilobytes per second, or megabytes per second</p><p><br /></p><h2>Conclusion</h2><p>The dd command is a powerful utility in Linux that can be used for various disk-related tasks. In this tutorial, we discussed how the dd command works and some of its most common uses, including creating a bootable USB drive, cloning a disk, and erasing a disk. With this knowledge, you should be able to use the dd command to perform a variety of disk-related tasks in Linux</p><p><br /></p></div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-17776393924030466582023-04-12T00:13:00.005-07:002023-04-12T00:13:44.184-07:00AWK Linux command for search and replace pattern in a file<p> Here are some examples of how to use AWK for searching file contents and replacing text in a file</p><p><br /></p><p><b>Searching file contents:</b></p><p><br /></p><p>To search for a specific pattern in a file, you can use the following command:</p><div><br /></div><div><div>awk '/pattern/' filename</div></div><div><br /></div><div>For example, to search for the word "example" in a file called "file.txt", you would use the following command:</div><div><br /></div><div><div>awk '/example/' file.txt</div></div><div><br /></div><div><br /></div><div>To search for a pattern and print the lines that match, you can use the following command:</div><div><br /></div><div><div>awk '/pattern/ { print }' filename</div></div><div><br /></div><div><br /></div><div>For example, to search for the word "example" in a file called
"file.txt" and print the lines that match, you would use the following
command:</div><div><br /></div><div><div>awk '/example/ { print }' file.txt</div></div><div><br /></div><div><br /></div><div><b>Replacing text in a file:</b></div><div><br /></div><div><br /></div><div>To replace a specific pattern with a new text in a file, you can use the following command:</div><div><br /></div><div><div>awk '{ gsub(/pattern/, "newtext"); print }' filename</div></div><div><br /></div><div><br /></div><div>For example, to replace the word "example" with the word "test" in a
file called "file.txt", you would use the following command:</div><div><br /></div><div><div>awk '{ gsub(/example/, "test"); print }' file.txt</div></div><div><br /></div><div><br /></div><div>To replace a pattern and save the changes back to the original file, you can use the following command:</div><div><br /></div><div><div>awk '{ gsub(/pattern/, "newtext"); print > "newfile" }' filename</div></div><div><br /></div><div><br /></div><div>For example, to replace the word "example" with the word "test" in a
file called "file.txt" and save the changes back to the original file,
you would use the following command:</div><div><br /></div><div><div>awk '{ gsub(/example/, "test"); print > "file.txt" }' file.txt</div></div><div><br /></div><div><br /></div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-29665473577459244292023-04-12T00:04:00.002-07:002023-04-12T00:04:57.403-07:00Linux Distributions overview <p> Linux is an open-source operating system that comes in many different distributions, each with its own unique features and benefits. Here is an overview of some of the most popular Linux distributions and what they offer:</p><ol><li><p>Ubuntu - Ubuntu is one of the most popular Linux distributions, known for its ease of use and user-friendly interface. It is based on Debian and comes with the GNOME desktop environment. Ubuntu is often used for desktop and laptop computers but can also be used for servers. It offers a wide range of pre-installed software, making it a good choice for beginners.</p></li><li><p>Debian - Debian is one of the oldest Linux distributions, known for its stability and security. It is a popular choice for servers, but can also be used for desktops and laptops. Debian comes with a variety of desktop environments, including GNOME, KDE, Xfce, and LXDE. It offers a large repository of software packages, making it easy to find and install the software you need.</p></li><li><p>Fedora - Fedora is a community-driven distribution sponsored by Red Hat. It is known for its cutting-edge software and frequent releases. Fedora comes with the GNOME desktop environment, but other desktop environments are available. It is often used for development and testing, but can also be used for general desktop and laptop use.</p></li><li><p>CentOS - CentOS is a free, community-driven distribution based on Red Hat Enterprise Linux (RHEL). It is known for its stability and security, making it a popular choice for servers. CentOS comes with a variety of desktop environments, but it is primarily used for server applications.</p></li><li><p>Arch Linux - Arch Linux is a minimalist distribution known for its flexibility and customization options. It comes with a lightweight desktop environment, but users are free to install and customize their own desktop environments. Arch Linux is often used by advanced users who want complete control over their system.</p></li><li><p>Mint - Mint is a popular Linux distribution known for its ease of use and user-friendly interface. It is based on Ubuntu and comes with the Cinnamon desktop environment. Mint is often used for desktop and laptop computers, but can also be used for servers. It offers a variety of pre-installed software, making it a good choice for beginners.</p></li><li><p>OpenSUSE - OpenSUSE is a community-driven distribution sponsored by SUSE Linux GmbH. It is known for its stability and security, making it a popular choice for servers. OpenSUSE comes with the KDE Plasma desktop environment, but other desktop environments are available.</p></li></ol><p>Each of these Linux distributions has its own unique features and benefits, and the choice ultimately depends on your specific needs and preferences. However, all Linux distributions offer the benefits of open-source software, including flexibility, security, and customizability.</p>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-926006621072211312023-04-11T01:36:00.002-07:002023-04-11T01:36:17.763-07:00Learning PythonThere are many online resources available to learn Python, including
Udemy. Here are a few beginner-level Python courses on Udemy that I
recommend:<div><br /></div><div><br /></div><div><ol><li><p>"Complete Python Bootcamp: Go from zero to hero in Python 3" by Jose Portilla - This is a comprehensive course that covers all the basics of Python programming, including data types, control structures, functions, object-oriented programming, and more. It's a great way to get started with Python and gain a solid foundation in programming.</p></li><li><p>"Python for Data Science and Machine Learning Bootcamp" by Jose Portilla - This course focuses on using Python for data analysis, visualization, and machine learning. It covers popular libraries like NumPy, Pandas, Matplotlib, and Scikit-Learn, and is a great choice if you're interested in using Python for NLP or other data-related tasks.</p></li><li><p>"Python 3 Programming Specialization" by University of Michigan - This is a series of courses offered by the University of Michigan on Coursera. It covers the basics of Python programming, as well as more advanced topics like data structures, algorithms, and web development. It's a great option if you're looking for a more structured learning experience with a focus on practical applications.</p></li></ol><p>These are just a few options, and there are many other great courses and resources available online. You can also find many free resources, like online tutorials and documentation, to help you learn Python. Good luck on your learning journey!</p><p><br /></p></div>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-72305144404230569032023-04-10T23:37:00.003-07:002023-04-10T23:37:52.435-07:00Are you interested in learning about prompt engineering!<p>Are you interested in learning about prompt engineering? Here's a step-by-step guide to get started:</p><ol><li><p>Understand the basics of AI: Before diving into prompt engineering, it's important to have a good grasp of the basics of AI. This includes concepts such as machine learning, deep learning, neural networks, and natural language processing (NLP). You can start by reading introductory materials on these topics, such as online articles or books.</p></li><li><p>Learn about OpenAI's GPT models: OpenAI's GPT models are some of the most popular language models used in AI today. Start by learning about the different GPT models, their features, and how they can be used.</p></li><li><p>Choose a programming language: Prompt engineering involves working with code, so it's important to choose a programming language to learn. Python is a popular language used in AI and is a good place to start. You can find many online resources and tutorials to help you learn Python.</p></li><li><p>Get familiar with AI libraries: There are many AI libraries available that make it easier to work with GPT models and perform natural language processing tasks. Some popular ones include TensorFlow, PyTorch, and Hugging Face. Learn how to use these libraries to build and train GPT models.</p></li><li><p>Understand the basics of prompt engineering: Prompt engineering involves creating prompts that can be used to generate text from GPT models. Learn about the different types of prompts, how to create them, and how to fine-tune GPT models to improve their output.</p></li><li><p>Practice and experiment: Practice is key to mastering prompt engineering. Experiment with different prompts, fine-tuning techniques, and AI libraries to see what works best for different types of text generation tasks.</p></li><li><p>Build a portfolio: As you gain more experience in prompt engineering, start building a portfolio of your work. This can include examples of prompts you've created, GPT models you've trained, and text generated from these models. This portfolio can be used to showcase your skills to potential clients or employers.</p></li></ol>Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-37069770214822424932020-04-15T03:46:00.000-07:002020-04-15T03:46:14.883-07:00How to fill memory on Linux<div dir="ltr" style="text-align: left;" trbidi="on">
The easy way to fill memory is to fill /dev/shm via dd command<br />
<br />
1) Fill shm with random data<br />
<blockquote class="tr_bq">
while true ; do dd if=/dev/zero of=/dev/shm/fill bs=1k count=4024k; sleep 2; done</blockquote>
2) Monitor memory usig free command and you should see memory usage under "used" and "free" changing<br />
<blockquote class="tr_bq">
while true ; do free -m ; sleep 2;done</blockquote>
<blockquote class="tr_bq">
# free -m<br /> total used free shared buff/cache available<br />Mem: 7822 1937 164 3920 5720 1650<br />Swap: 3583 0 3583</blockquote>
<br /></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-81775334151004143642020-03-30T03:33:00.001-07:002020-03-31T00:25:42.976-07:00Grant command changed in MySQL 8<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">The below command no longer working in MySQL 8.x</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;" />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">msql> GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost" IDENTIFIED BY "password";</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY "password"' at line 1</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;" />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">It seems that MySQL no longer support the one liner version of grant command, it's now requires to create user first and the grant the privileges</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;" />
<br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;" />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">mySQL> CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'word123';</span><br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">Query OK, 0 rows affected (0.01 sec)</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;" />
<br />
<span style="background-color: white; color: #222222; font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wordpress"@"localhost";</span></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-79740467937436332612020-03-25T03:32:00.002-07:002020-03-25T03:32:46.549-07:00Duck DNS free dynamic DNS for your hosts<div dir="ltr" style="text-align: left;" trbidi="on">
A few days back I was searching for free DNS server to use for my dynamic IP host<br />
<br />
Found <a href="https://www.duckdns.org/">DuckDNS </a>from its web it says ...<br />
"Duck DNS is a free service which will point a DNS (sub domains of duckdns.org) to an IP of your choice"<br />
<br />
Below are the steps to configure and use DuckDNS service<br />
<br />
1) First create a log in the duckdns, by choosing sign in with Google , twitter etc<br />
2) Once logged in take note of the "Token" which will be on the first page<br />
3) Create a subdomain by typing the name in the sub domain box and click "add domain" button. This would be your DNS hostname in the form of yourdomain.duckdns.org<br />
4) Follow the instructions under the "install" tab to configure duckdns on your dynamic IP host, below is the steps for Linux host with cron installed already<br />
<br />
- mkdir duckdns<br />
- cd duckdns<br />
- Now copy this text and put it into the script<br />
vi duck.sh<br />
echo url="https://www.duckdns.org/update?domains=exampledomain&token=a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip=" | curl -k -o /root/duckdns/duck.log -K -<br />
<br />
Replace<br />
<i>exampledomain</i>: with your subdomain name created on duckdns site<br />
<i>a7c4d0ad-114e-40ef-ba1d-d217904a50f2&ip=</i> : with your token from the duckdns site<br />
<br />
- Make the script executable<br />
chmod 700 duck.sh<br />
- Next, create a crontab entry for the script to run every 5 minutes<br />
*/5 * * * * /root/duckdns/duck.sh >/dev/null 2>&1<br />
<br />
- Test the script<br />
./duck.sh<br />
<br />
This should simply return to a prompt, we can also see if the last attempt was successful (OK or bad KO)<br />
cat duck.log<br />
<br />
5) Now try ssh into your Linux host using the domain name created<br />
ssh youdomain.duckdns.org<br />
<br />
6) Reboot the host or change the IP of the host and then wait 5 minutes, you should be able to ssh using the DNS domain name<br />
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-59491312061946546582020-03-16T04:13:00.002-07:002020-03-16T04:13:16.547-07:00Duck DNS<div dir="ltr" style="text-align: left;" trbidi="on">
Now it's easy to remember my internet-facing hosts with dynamic IP using <a href="https://www.duckdns.org/about.jsp">DuckDNS</a></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-35040640488636784002019-01-14T03:36:00.002-08:002019-01-14T03:47:08.767-08:00How to boot into Rescue Mode or Emergency Mode CentOS / RHEL / Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
This <a href="https://www.ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/">article</a> explain Rescue Mode and Emergency and also explain how to boot Ubuntu into these modes.<br />
<br />
This <a href="https://www.thegeekdiary.com/centos-rhel-7-how-to-boot-into-rescue-mode-or-emergency-mode/">Article </a>explain how to boot CentOS/ RHEL 7 into rescue or emergency mode<br />
<br />
I found it very useful hence sharing here<br />
<br /></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com1tag:blogger.com,1999:blog-5356450989645359839.post-49317766320927093172019-01-13T23:05:00.000-08:002019-01-13T23:05:03.938-08:00Play with Docker<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px;">The <a href="https://training.play-with-docker.com/">Play with Docker</a> classroom is a nice tool for newbies to learn containers/Docker. Give it a try </span><div>
<span style="background-color: white; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px;"><br /></span></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-50365274591798769822016-05-01T05:11:00.000-07:002019-11-18T21:57:31.327-08:00Rotating traffic captures using tcpdump<div dir="ltr" style="text-align: left;" trbidi="on">
To avoid creating large traffic captures using tcpdump, there are couple of interesting switches in tcpdump command which enable one to create rotating traffic captures, compress it on the fly etc.<br />
<br />
<code>
ni :specifies the network interface on which to capture traffic<br />
-s :; indicates a capture of the full size of the packet<br />
-vvv : verbose<br />
-w : indicates the file name and location in which the capture will be saved<br />
-C : indicates the size of each file, after reaching this size file will be rotated<br />
-W : indicates the number of files that will be stored<br />
-z : to compress the file
</code>
<br />
<code><br /></code>
For example,<br />
<br />
<code>
tcpdump -ni eth1 -C 20 -z gzip -w /tmp/trace.pcap<br />
<br />
</code>
This would create a file named trace.pcap...trace.pcapX. After 20MB of data, (-C 20) tcpdump would create a file named trace.pcapX and so on. and compress the capture files after tcpdump finished writing to them.<br />
<br />
<code>
tcpdump -pni eth0 -s0 -C 100 -W 10 -w /tmp/capture<br />
<br />
</code>
In this example, tcpdump starts capturing into capture1 until it reaches capture10. When it filled up capture10 with 100MB of data, it starts again, overwriting capture1. This way, your captures<br />
will never use more then 1000MB of disk space.<br />
<br /></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com6tag:blogger.com,1999:blog-5356450989645359839.post-57682562095072518002016-05-01T03:29:00.000-07:002016-05-01T03:29:06.620-07:00gdb all threads bt to file<div dir="ltr" style="text-align: left;" trbidi="on">
Perform the following steps to collect a backtrace from a core dump for all threads.<br />
<br />
Find the core file and the executable that created.<br />
<br />
Start gdb in the directory where the log file should be created:<br />
<br />
By default, gdb will create a logfile called gdb.txt in the current working directory when logging is enabled. Optionally, specify a different logfile name with this command:<br />
<br />
Enable logging by running the following commands:<br />
<br />
<code>
(gdb) set height 0<br />
(gdb) set logging file /tmp/thread_apply_all_bt.txt<br />
(gdb) set logging on<br />
Copying output to /tmp/thread_apply_all_bt.txt<br />
</code>
<br />
<br />
Request a backtrace:<br />
<br />
<code>
(gdb) thread apply all bt full<br />
</code>
<br />
<code><br /></code>
Exit gdb by running the quit command, or press Ctrl-D.<br />
Collect the logfile.<br />
<div>
<br /></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com4tag:blogger.com,1999:blog-5356450989645359839.post-17623320495681456712014-12-07T05:03:00.000-08:002014-12-07T05:03:46.574-08:00Docker and BusyBox<div dir="ltr" style="text-align: left;" trbidi="on">
Ever heard of <a href="http://www.busybox.net/about.html">Busybox</a> or you are like me living in a cave. YAS today heard of it<br />
<br />
<b>BusyBox: The Swiss Army Knife of Embedded Linux</b><br />
<br />
Its so tiny that the Docker image is only few mb in my case 2.433 MB<br />
<br />
<b>Dockerizing <a href="https://registry.hub.docker.com/_/busybox/">BusyBox</a></b><br />
<br />
<b>To Run BusyBox </b><br />
docker run --rm -it busybox<br />
<br />
This will drop you into sh shell.<br />
<br />
<b>You can use Busybox to test your static binaries For example</b><br />
<br />
1. Create a Dockerfile for a binary<br />
<br />
From busybox<br />
copy my-binary /my-binary<br />
CMD ["/my-binary"]<br />
<br />
2. Now build the image<br />
docker build -t my-binary:v1 .<br />
<br />
3. Finally run the container from the image to test your binary<br />
docker run --rm -it my-binary:v1<br />
<div>
<br /></div>
<div>
Happy dockerizing</div>
<div>
<br /></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-52051522883832113712014-12-07T04:10:00.001-08:002014-12-07T04:10:50.095-08:00Oracle Linux Image for Docker<div dir="ltr" style="text-align: left;" trbidi="on">
Everyone is talking about Docker these days, Oracle also took the notice and recently make Oracle Linux 6 and 7 images available for Docker.<br />
<br />
Note: Oracle Linux is rebuild of RHEL same as Centos or Scientific Linux. ;)<br />
<br />
<b>Lets try to containerize the oracle linux OL7</b><br />
<br />
1. Assuming Docker is already installed on your favorite Linux distro<br />
<br />
2. Download the <a href="http://public-yum.oracle.com/docker-images/OracleLinux/OL7/">Oracle Linux image</a><br />
<br />
3. Uncompress it , this will give oraclelinux-7.0.tar in the current directory<br />
$ unxz oraclelinux-7.0.tar.xz<br />
<br />
4. Load the image to your local Docker repository.<br />
# docker load -i unxz oraclelinux-7.0.tar<br />
<br />
5. check local image repo<br />
<br />
# docker images<br />
<br />
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE<br />
oraclelinux 7.0 5f1be1559ccf 3 weeks ago 265.2 MB<br />
askhan/salt-minion v1 9b40143974c1 9 weeks ago 294.6 MB<br />
<br />
6. Finally run container based on OL7 image<br />
# docker run --rm -it --name oracle7 oraclelinux:7.0 bash<br />
<br />
7. Now inside the container<br />
[root@fcc43a277822 /]# cat /etc/redhat-release<br />
Red Hat Enterprise Linux Server release 7.0 (Maipo)<br />
<br />
Hey what this is RHEL...come on make your own Linux distro to better serve the community. (Oracle)<br />
<br /></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com12tag:blogger.com,1999:blog-5356450989645359839.post-32900426894606069552014-11-30T08:31:00.003-08:002014-11-30T08:31:52.915-08:00Docker - Untagged images<div dir="ltr" style="text-align: left;" trbidi="on">
<b>sudo docker images --filter "dangling=true"</b><br />
<br />
$ sudo docker images --filter "dangling=true"<br />
<br />
<br />
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE<br />
none <none> 8c39e8847482 5 hours ago 4.799 GB</none><br />
none <none> 1e422624b663 5 hours ago 4.799 GB</none><br />
none <none> 889bb1e7a182 7 hours ago 361.7 MB</none><br />
<br />
This will display untagged images, that are the leaves of the images tree (not intermediary layers). These images occur when a new build of an image takes the repo:tag away from the image ID, leaving it untagged. A warning will be issued if trying to remove an image when a container is presently using it. By having this flag it allows for batch cleanup.<br />
<br />
<b>To remove untagged images</b><br />
<br />
$ sudo docker rmi $(sudo docker images -f "dangling=true" -q)<br />
<br />
Deleted: 8c39e8847482dc326fe38a0ad081d6f07692cf960ad8a60b9dbcd23e8e5f8237<br />
Deleted: 5352141119ef008c0f8b86c716fff56b193b51cd24275e6865155e82a68d90d1<br />
Deleted: 1e422624b663f5bcc17942311ee0bf6c050a3c72287edb00b55b9b7150c84038<br />
Deleted: 43b55a8043f57522807cb4fd2e3801730b0d1d5bfe06c56138cc724be31f9a3f<br />
Deleted: 42cc277fae8850bc2d2238b09932bc158f82d85df6d14491628da13bc9f8f5d7<br />
Deleted: 3770e4be4740d3826f3084d0edfa63376605804c37f0c1f8d3de540562cad3ad<br />
Deleted: ecafe52bc8ecf1195dbbb4654e5f3627f9607dce5cc7015e2fe1d667083b3a19<br />
Deleted: 0c2ed3587fa939e32af3a5330a8a93c19bd210dc0d1c6cbf3e2da4e04b1eec44<br />
Deleted: 5b5278f9083cb4c05a673698c83890977ffd21e11f2047a6731361ffa5bac6dd<br />
Deleted: 33d4b2ed6b3885493892e17a642f5535bccc68deebfab82e9f97aa4942b37c05<br />
Deleted: bbf510a7340697608c24e61be82ca0e12ea7be746806f481f8da0dec4e1f33b1<br />
Deleted: 39288867bab065f8bf297f0a9c1708615e42427435666380c510540abfc39589<br />
Deleted: ac25dd76fbcfd9c9108669f020b1d5d4eff77030591a4ce2fb346d14677c9b02<br />
Deleted: 66247125226f32376d3731e9294f069e87c94dbd97b5cb29fc4d3cfa78092f13<br />
Deleted: 6109906a8f91f6c72dbc24e5b23ec981f4f6ea27b2cfe47bec6a4c1d0b7ec71b<br />
Deleted: 883939159dd96fd6cf40b3bc0fa0ae1d71dc2cc4aebb187948bb3bc5b6013959<br />
Deleted: 889bb1e7a182d2e6a146cf4fb72015171f8c4fcb58b2294650db02126d7287d3<br />
Deleted: ab174de7a01d3c8a10fb003e2fbb296f7d2dca21c2485f88f0afaadcb82e4def<br />
Deleted: f31fa04bf31d366f9b72d49dce13b15cb2aafcae232d872164beb56c4c3bd178<br />
Deleted: 40a48a6b1f4b31498047e0f3b918071f6ca9597994266a45fce7b39d929971c3<br />
Deleted: 809eb6bc51974ebc6d5949c31db89ff46f8b9ef8b7259b8c99019b62eff49b4b<br />
Deleted: 006f1bd2da6d5f834ad6d2402d8c1155aace711e3434904be3483e6c6861e97d<br />
Deleted: 0c92cae6419cb1d6982698baebc26006c48b06f66b1c31a2add81e1518093b0d<br />
Deleted: c602b1c4d4cbe989db12e0e07b55315fc1f950f8982dc23b0aaac83b9d7322e0<br />
Deleted: d4718839b6a8e008c6873ded5bd023e2952f583982ab4e0c6a69f4133c047785<br />
Deleted: 55d2c09e4784bdd28972b3fe0f6900ba1f2dee323192e989648be0495417cba1<br />
Deleted: 20afcdfe2ea7b5d6e4cc541c4a66f0cf7395b1520a14c36ad7b89bf703250586<br />
<br />
This give me around 10GB free disk space.<br />
<br /></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-77740586353382803472014-11-23T01:07:00.001-08:002014-11-23T01:07:11.515-08:00Upgrading Docker using the script<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
In my <a href="http://askaralikhan.blogspot.ae/2014/09/docker-installation-script.html">previous
post </a>we used the <span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt;">script available from Docker site to help with installing
Docker.</span><br />
<br />
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt;">Using the same script one can upgrade the Docker.</span><br />
<br />
<b style="mso-bidi-font-weight: normal;"><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt;">Before upgrading Docker</span></b><br />
<br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: 'Courier New', Courier, monospace; font-size: 14.3999996185303px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px;">sudo docker version
Client version: 1.2.0
Client API version: 1.14
Go version (client): go1.3.1
Git commit (client): fa7b24f
OS/Arch (client): linux/amd64
Server version: 1.2.0
Server API version: 1.14
Go version (server): go1.3.1
Git commit (server): fa7b24f</span><br />
<br />
<span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;">Execute script to install newer version of Docker</span><br />
<br />
<span style="background: white; color: black; font-family: "Courier New"; font-size: 11.0pt;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;">$ curlhttps://get.docker.io/ | sudo sh </span></span></span><br />
<br />
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;">Once the script finished, Docker 1.3.1 is installed and Docker daemon was automatically started.</span></span></span><br />
<br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: 'Courier New', Courier, monospace; font-size: 14.3999996185303px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px;">$ sudo docker version
Client version: 1.3.1
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 4e9bbfa
OS/Arch (client): linux/amd64
Server version: 1.3.1
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 4e9bbfa</span><br />
<br />
<span style="-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: 'Courier New', Courier, monospace; font-size: 14.3999996185303px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px;"> </span><br />
<span style="background: white; color: black; font-family: "Courier New"; font-size: 11.0pt;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;"><span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;"> </span> </span> </span></span><br />
<div class="MsoNormal">
<br /></div>
<span style="-webkit-text-stroke-width: 0px; float: none; orphans: auto; text-align: start; white-space: pre-wrap; widows: auto; word-spacing: 0px;"></span><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]--><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";"><span style="-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: 'Courier New', Courier, monospace; font-size: 14.3999996185303px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: auto; word-spacing: 0px;"></span></span></div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-77865561169537224932014-09-27T22:56:00.002-07:002014-09-27T22:58:42.334-07:00Deleting a Docker container<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
If you are finished with a container, you can delete it
using the docker rm command.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
You must stop it first using the docker stop command or
docker kill command.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Deleting a container</b></div>
<div class="MsoNormal">
# docker rm ba1d58bfb1dc</div>
<div class="MsoNormal">
ba1d58bfb1dc </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<b>Deleting a running container</b></div>
<div class="MsoNormal">
# docker rm –f ba1d58bfb1dc</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Deleting all containers</b></div>
<div class="MsoNormal">
There is currently no command to delete all containers but
you can combine docker ps –a and docker ps –q to delete all containers.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
# docker rm $(docker ps -a -q)</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
ps –a list all the containers </div>
<div class="MsoNormal">
ps -q list the ids of all containers</div>
<div class="MsoNormal">
<br /></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-12681782277399979262014-09-26T11:07:00.002-07:002014-09-27T22:33:57.979-07:00Attaching to docker container<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal">
<span style="color: #394d54; font-family: Helvetica, sans-serif; font-size: 10.5pt; line-height: 115%;">You
launched your Docker container with</span></div>
<div class="MsoNormal">
<b><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">sudo docker –run –I –t
–name grey_cat centos /bin/bash<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">This
creates the container name “grey_cat” from base image “centos” and ran the bash
shell inside it, the container’s is presented.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">Once
you are done with the container you type “exit” which stop the container and
get back to you host shell.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">So
what happened to container? The container still exists; we can show a list of
current containers using the </span><b><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">docker ps -a</span></b><span style="color: #394d54; font-family: Helvetica, sans-serif; font-size: 10.5pt; line-height: 115%;"> command</span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: Helvetica, sans-serif; font-size: 10.5pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">To
start the stopped container <o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">sudo docker start
grey_cat <o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">This
start the container with the same options when it was launched with docker run
command.<b><o:p></o:p></b></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
<div class="MsoNormal">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">To
attach to the interactive session we can use <b>attach</b> command<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; line-height: 115%; mso-fareast-font-family: "Times New Roman";">sudo docker attach
grey_cat<o:p></o:p></span></b></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br />
You might need to Enter to get the command prompt.<br />
<br /></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-49519115882733036422014-09-26T10:28:00.001-07:002014-09-26T10:28:14.948-07:00Docker Installation Script<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: Helvetica, sans-serif; font-size: 10.5pt; line-height: 17.85pt;">It’s easy to install
Docker using your distro package management system for example in Centos,
Redhat, Fedora using yum and, in Ubuntu, Debian using apt-get.</span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">There is also a simple
curl script available to help with installing Docker.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">- Make sure curl is
install, if not first install it.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">- Now install Docker
from installation script<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; mso-fareast-font-family: "Times New Roman";">$ curl -sSL https://get.docker.io/ubuntu/ |
sudo sh</span><span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">- To verify that
everything has worked as expected:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">$ sudo docker run -i -t
ubuntu /bin/bash<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";">This should download
the Ubuntu image, and then start bash in a container.</span></div>
<div class="MsoNormal" style="background: white; line-height: 17.85pt; margin-bottom: 12.0pt;">
<span style="color: #394d54; font-family: "Helvetica","sans-serif"; font-size: 10.5pt; mso-fareast-font-family: "Times New Roman";"><br /></span></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0tag:blogger.com,1999:blog-5356450989645359839.post-29643578427293412572014-09-25T01:50:00.001-07:002014-09-25T01:50:06.040-07:00Linux Bash Vulnerability CVE-2014-6271 ("Shellshock")<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->There is apparently a vulnerability in bash <a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271">http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271</a><br />
<br />
<div class="MsoNormal">
<b>Summary: </b></div>
<div class="MsoNormal">
Vulnerability has been found where variables that control
the environment of the Linux system can be sent to the Bash application and
when the Bash application starts, the content of the variable will be executed.
This vulnerability allows a hacker to inject malicious code that the Bash
application will run without validation. In a worst case scenario, this can
allow the hacker to gain control of the system. <br />
<br />
The bug lies in Bash's handling of environment variables: when assigning a
function to a variable, trailing code in the function definition will be
executed, leaving the door wide open for code-injection attacks. The
vulnerability is exploitable remotely if code can be smuggled into environment
variables sent over the network – and it's surprisingly easy to do so. <br />
<br />
<b>Systems Affected</b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Linux (all OS versions containing Bash GNU 4.3 or earlier) <br />
Mac OSX (v10.9.5 and earlier) NOTE: Not confirmed yet but suspected </div>
<div class="MsoNormal">
Freebsd running bash version <= 4.3 </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Test if your servers is vulnerable: </b></div>
<div class="MsoNormal">
Execute the following code on bash shell </div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">$
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="background-color: white;"><span style="background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto auto; font-family: "Courier New"; font-size: 10pt;">vulnerable</span></span></div>
<span style="background-color: white;">
</span><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="background-color: white;"><span style="background-attachment: scroll; background-clip: border-box; background-image: none; background-origin: padding-box; background-position: 0% 0%; background-repeat: repeat; background-size: auto auto; font-family: "Courier New"; font-size: 10pt;">this is a test</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal">
If you get the output “vulnerable” then your system is affected.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Installing update</b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Most of the distros already patched bash and released an
update, install the update using your distro package management system.<span style="mso-spacerun: yes;"> </span>A <a href="http://lists.gnu.org/archive/html/bug-bash/2014-09/threads.html" target="_blank">GNU Bashpatch</a> is also available for experienced users and administrators to
implement.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I am running couple of latest Ubuntu (Trusty) virtual
machines, and when I checked they already released bash updates (4.3-7ubuntu1.1)</div>
<pre><code> </code></pre>
<pre><code>sudo apt-get update<span style="mso-spacerun: yes;"> </span># Fetches the list of available updates</code></pre>
<pre><code>sudo apt-get dist-upgrade<span style="mso-spacerun: yes;"> </span># Installs updates</code></pre>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Test after installing update</b></div>
<pre> </pre>
<pre># env x='() { :;}; echo vulnerable' bash -c "echo this is "</pre>
<pre>bash: warning: x: ignoring function definition attempt</pre>
<pre>bash: error importing function definition for `x'</pre>
<pre>this is a test</pre>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Bravo the system is now patched and no more worries about
bash shellshock <span style="font-family: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings;">:)</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>
Askar Ali Khanhttp://www.blogger.com/profile/05507996276162189936noreply@blogger.com0