<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WiredRevolution.com &#187; terminal</title>
	<atom:link href="http://www.wiredrevolution.com/tag/terminal/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredrevolution.com</link>
	<description>A Bit of Linux Wisdom</description>
	<lastBuildDate>Wed, 18 Jan 2012 22:45:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Echo text without a trailing newline</title>
		<link>http://www.wiredrevolution.com/bash-programming/echo-text-without-a-trailing-newline?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=echo-text-without-a-trailing-newline</link>
		<comments>http://www.wiredrevolution.com/bash-programming/echo-text-without-a-trailing-newline#comments</comments>
		<pubDate>Fri, 18 Feb 2011 18:28:20 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[carrage return]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[continuation]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[escape]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[line break]]></category>
		<category><![CDATA[newline]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[stop]]></category>
		<category><![CDATA[supress]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[trailing]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=1552</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/bash_icon.png" width="80" height="34" alt="" title="bash" /><br/>By default the echo command will include a trailing newline at the end of a string. There are many times when you may want to suppress this newline for example when you want to format text in a certain way.There are a couple easy ways to do this. First you can use the &#8216;-n&#8217; option. [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/bash-programming/customize-the-bash-ps1-command-prompt' rel='bookmark' title='Permanent Link: Customize the BASH PS1 command prompt'>Customize the BASH PS1 command prompt</a></li>
<li><a href='http://www.wiredrevolution.com/bash-programming/command-substitution-in-bash' rel='bookmark' title='Permanent Link: Command substitution in BASH'>Command substitution in BASH</a></li>
<li><a href='http://www.wiredrevolution.com/bash-programming/find-the-exit-status-of-a-previous-command-in-bash' rel='bookmark' title='Permanent Link: Find the exit status of a previous command in Bash'>Find the exit status of a previous command in Bash</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/bash_icon.png" width="80" height="34" alt="" title="bash" /><br/><p>By default the echo command will include a trailing newline at the end of a string. There are many times when you may want to suppress this newline for example when you want to format text in a certain way.There are a couple easy ways to do this.</p>
<p>First you can use the &#8216;-n&#8217; option.<br />
<code>$ echo -n "hello"</code></p>
<p>You can also use the &#8216;-e&#8217; option which enables interpretation of backslash escapes. Followed by a &#8216;\c&#8217; escape character to signal continuation (no automatic line break).<br />
<code>$ echo -e "hello\c"</code></p>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/bash-programming/customize-the-bash-ps1-command-prompt' rel='bookmark' title='Permanent Link: Customize the BASH PS1 command prompt'>Customize the BASH PS1 command prompt</a></li>
<li><a href='http://www.wiredrevolution.com/bash-programming/command-substitution-in-bash' rel='bookmark' title='Permanent Link: Command substitution in BASH'>Command substitution in BASH</a></li>
<li><a href='http://www.wiredrevolution.com/bash-programming/find-the-exit-status-of-a-previous-command-in-bash' rel='bookmark' title='Permanent Link: Find the exit status of a previous command in Bash'>Find the exit status of a previous command in Bash</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/bash-programming/echo-text-without-a-trailing-newline/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to SSH into Ubuntu LiveCD</title>
		<link>http://www.wiredrevolution.com/ubuntu/how-to-ssh-into-ubuntu-livecd?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-ssh-into-ubuntu-livecd</link>
		<comments>http://www.wiredrevolution.com/ubuntu/how-to-ssh-into-ubuntu-livecd#comments</comments>
		<pubDate>Tue, 16 Dec 2008 14:08:44 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[8.10]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[inet addr]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[IP address]]></category>
		<category><![CDATA[livecd]]></category>
		<category><![CDATA[openssh_server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=865</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/ubuntu_icon.png" width="80" height="78" alt="" title="ubuntu" /><br/>The ability to remotely SSH into a machine running an Ubuntu LiveCD can come in handy in many situations. The LiveCD supports a large variety of hardware and can be used to troubleshoot system problems on a machine where you have limited or no access. A user with limited skills can easily setup remote access [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh' rel='bookmark' title='Permanent Link: Share a remote filesystem over SSH'>Share a remote filesystem over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh' rel='bookmark' title='Permanent Link: How to X session forwarding over SSH'>How to X session forwarding over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/ubuntu/allow-sudo-access-without-passwords-in-ubuntu' rel='bookmark' title='Permanent Link: Allow sudo access without passwords in Ubuntu'>Allow sudo access without passwords in Ubuntu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/ubuntu_icon.png" width="80" height="78" alt="" title="ubuntu" /><br/><p>The ability to remotely <strong>SSH</strong> into a machine running an <strong>Ubuntu</strong> <strong>LiveCD</strong> can come in handy in many situations. The LiveCD supports a large variety of hardware and can be used to troubleshoot system problems on a machine where you have limited or no access. A user with limited skills can easily setup remote access and allow a trusted friend to troubleshoot the system from another location.</p>
<p>The first thing to start the process is to open a <strong>terminal</strong>. Follow these menus:</p>
<p><strong>Applications -> Accessories -> Terminal</strong></p>
<p>In the terminal install the <strong>ssh server</strong> on your LiveCD system.</p>
<pre>
$ sudo apt-get install openssh-server
</pre>
<p>The server is started automatically after installing. </p>
<p>To login remotely, you’ll need to set the password for the default ubuntu user.</p>
<pre>
$ sudo passwd ubuntu
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
</pre>
<p>You should now be able to login to the system running the LiveCD. But first you need to <a href="http://www.wiredrevolution.com/system-administration/find-your-ip-address-with-ifconfig">find the IP address</a> of the machine so you can connect to it.</p>
<p>The <strong>ifconfig</strong> command will list your network interfaces and along with it your IP address.</p>
<pre>
$ ifconfig
</pre>
<pre>
eth0      ...
          <strong>inet addr:192.168.1.1</strong>  Bcast:192.168.2.255  Mask:255.255.255.0
          ...
</pre>
<p>The <strong>inet addr</strong> entry is your IP address which you need to log into the LiveCD system. As you an see above the IP address begins with &#8220;<strong>192.168</strong>&#8221; which indicates that the IP address is only valid on the local network. It was an address assigned to the machine by the router.  This is fine if you plan on logging in from another machine on this local network.</p>
<p>If you need to access the machine from outside your local network you have a couple of options.  The first is to remove any router between you and the Internet. This should give you a valid IP address which is accessible from outside your local network. You may also be able to access your router&#8217;s administration panel and tell it to pass SSH traffic to the IP address of the LiveCD system.  You will then use the router&#8217;s IP address instead for the next step.</p>
<p>If your IP address already begins with something other than &#8220;<strong>192.168</strong>&#8221; then you are safe as well. You should be able to access the LiveCD system from any location, local or not.</p>
<p>Using the IP address from the previous step you can now log into the LiveCD system as the ubuntu user. Use the password you created earler.</p>
<pre>
$ ssh ubuntu@&lt;IP Address&gt;
</pre>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh' rel='bookmark' title='Permanent Link: Share a remote filesystem over SSH'>Share a remote filesystem over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh' rel='bookmark' title='Permanent Link: How to X session forwarding over SSH'>How to X session forwarding over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/ubuntu/allow-sudo-access-without-passwords-in-ubuntu' rel='bookmark' title='Permanent Link: Allow sudo access without passwords in Ubuntu'>Allow sudo access without passwords in Ubuntu</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/ubuntu/how-to-ssh-into-ubuntu-livecd/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find controlling terminal with ttyname</title>
		<link>http://www.wiredrevolution.com/c/find-controlling-terminal-with-ttyname?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=find-controlling-terminal-with-ttyname</link>
		<comments>http://www.wiredrevolution.com/c/find-controlling-terminal-with-ttyname#comments</comments>
		<pubDate>Thu, 06 Nov 2008 13:08:37 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[/dev/pts]]></category>
		<category><![CDATA[/dev/tty]]></category>
		<category><![CDATA[controlling]]></category>
		<category><![CDATA[file descriptors]]></category>
		<category><![CDATA[pseudo-terminal]]></category>
		<category><![CDATA[stderr]]></category>
		<category><![CDATA[stdin]]></category>
		<category><![CDATA[stdout]]></category>
		<category><![CDATA[system call]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[ttyname]]></category>
		<category><![CDATA[virtual console]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=615</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/c_icon.png" width="80" height="80" alt="" title="C" /><br/>You can identify the path the the controlling terminal device path for your current process in C with the ttyname() system call. This controlling terminal can be a virtual console (/dev/ttyn) or a pseudo-terminal (/dev/pts/n). The ttyname system call takes the following format. char *ttyname(int fd); The stdin, stdout, stderr file descriptors unless redirected are [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/bash-programming/io-redirection-in-bash' rel='bookmark' title='Permanent Link: I/O redirection in BASH'>I/O redirection in BASH</a></li>
<li><a href='http://www.wiredrevolution.com/c/format-output-using-printf' rel='bookmark' title='Permanent Link: Format output using printf'>Format output using printf</a></li>
<li><a href='http://www.wiredrevolution.com/c/display-hostname-and-ip-address-in-c' rel='bookmark' title='Permanent Link: Display hostname and IP address in C'>Display hostname and IP address in C</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/c_icon.png" width="80" height="80" alt="" title="C" /><br/><p>You can identify the path the the controlling terminal device path for your current process in C with the ttyname() system call.  This controlling terminal can be a <strong>virtual console</strong> (<strong>/dev/tty</strong>n) or a <strong>pseudo-terminal</strong> (<strong>/dev/pts/</strong>n).</p>
<p>The ttyname system call takes the following format.</p>
<p><strong>char *ttyname(int fd);</strong></p>
<p>The <strong>stdin</strong>, <strong>stdout</strong>, <strong>stderr</strong> file descriptors unless redirected are by default mapped to the controlling terminal. So for example you can pass it the stdin file descriptor.</p>
<pre>
char * pathname;
pathname = ttyname(0);

printf("controlling terminal : %s\n", pathname);
</pre>
<pre>
controlling terminal : /dev/pts/0
</pre>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/bash-programming/io-redirection-in-bash' rel='bookmark' title='Permanent Link: I/O redirection in BASH'>I/O redirection in BASH</a></li>
<li><a href='http://www.wiredrevolution.com/c/format-output-using-printf' rel='bookmark' title='Permanent Link: Format output using printf'>Format output using printf</a></li>
<li><a href='http://www.wiredrevolution.com/c/display-hostname-and-ip-address-in-c' rel='bookmark' title='Permanent Link: Display hostname and IP address in C'>Display hostname and IP address in C</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/c/find-controlling-terminal-with-ttyname/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

