{"id":321,"date":"2013-09-27T10:28:54","date_gmt":"2013-09-27T08:28:54","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=321"},"modified":"2013-10-05T22:45:07","modified_gmt":"2013-10-05T20:45:07","slug":"import-utf8-into-mysql","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=321","title":{"rendered":"Ubuntu and Debian Linux starter user guide"},"content":{"rendered":"<h2>Useful Linux Command :<\/h2>\n<p>To have a root shell as root.<\/p>\n<pre># sudo su<\/pre>\n<p>To have a root shell as \/you\/.<\/p>\n<pre># sudo -s<\/pre>\n<p>Try both and do an echo $HOME to see the difference.<br \/>\nsudo su is the equivalent to sudo -i<\/p>\n<p><strong>Linux version<\/strong><\/p>\n<pre># uname -p\r\nversion processeur i686 =&gt; x3<\/pre>\n<p><strong>Taille partition disque<\/strong><\/p>\n<pre># df<\/pre>\n<p><strong>Date check<\/strong><\/p>\n<pre># date<\/pre>\n<p><strong>Logout session (Useful in case of permissions take effect)<\/strong><\/p>\n<pre># logout<\/pre>\n<p><strong>Change keyboard to azerty for french language :<\/strong><\/p>\n<pre># loadkeys fr<\/pre>\n<p>Update the debian or ubuntu system :<\/p>\n<pre># sudo apt-get update<\/pre>\n<p>What is my IP :<\/p>\n<pre># ifconfig<\/pre>\n<hr \/>\n<p><strong>Interface graphique (Kubuntu \/ pr\u00e9voir 1Gb RAM)<\/strong><br \/>\n# sudo apt-get install kubuntu-desktop<\/p>\n<hr \/>\n<h1>Show All Running Processes in Linux<\/h1>\n<h2>ps command<\/h2>\n<p>Type the following <strong>ps command<\/strong> to display all running process <a href=\"http:\/\/www.cyberciti.biz\/faq\/show-all-running-processes-in-linux\/\" target=\"_blank\">see link<\/a> :<\/p>\n<pre># ps aux | less<\/pre>\n<p>Where,<\/p>\n<ul>\n<li>-A: select all processes<\/li>\n<li>a: select all processes on a terminal, including those of other users<\/li>\n<li>x: select processes without controlling ttys<\/li>\n<\/ul>\n<h2>Task: see every process on the system<\/h2>\n<pre># ps -A\r\n# ps -e<\/pre>\n<h2>Task: See every process except those running as root<\/h2>\n<pre># ps -U root -u root -N<\/pre>\n<h2>Task: See process run by user vivek<\/h2>\n<pre># ps -u vivek<\/pre>\n<h2>Task: top command<\/h2>\n<p>The top program provides a dynamic real-time view of a running system. Type the top at command prompt:<\/p>\n<pre># top<\/pre>\n<p>To quit press <strong>q<\/strong>, for help press <strong>h<\/strong>.<\/p>\n<h3>Task: display a tree of processes<\/h3>\n<p>pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown.<\/p>\n<pre>$ pstree<\/pre>\n<h2>Task: Lookup process<\/h2>\n<p>Use pgrep command. pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to screen. For example display firefox process id:<\/p>\n<pre>$ pgrep firefox<\/pre>\n<p>Sample outputs:<\/p>\n<pre>3356<\/pre>\n<hr \/>\n<h2>kill command syntax<\/h2>\n<p>The kill command causes the specified signal to be sent to the specified process. The kill command has the general form as follows:<br \/>\n<strong>kill -N PID<\/strong><br \/>\nWhere,<\/p>\n<ul>\n<li><strong>N<\/strong> is a signal number<\/li>\n<li><strong>PID<\/strong> is the Process Identification Number. If you do not know the PID, it can be learned through the ps command.<\/li>\n<\/ul>\n<h3>Understanding signal numbers<\/h3>\n<p>The signal number 1 is a hangup signal. I recommended using 1 signal because it should kill the process and it can save the buffer (if supported). For example if it is an editor, save the buffer. This is the default if you do not specify a signal number. Signal number 9, a kill signal, is the surest way to kill a process.<\/p>\n<h3>Some of the more commonly used signals:<\/h3>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>signal #<\/strong><\/td>\n<td><strong>Usage<\/strong><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>HUP (hang up)<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>INT (interrupt)<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>QUIT (quit)<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>ABRT (abort)<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>KILL (non-catchable, non-ignorable kill)<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>ALRM (alarm clock)<\/td>\n<\/tr>\n<tr>\n<td>15<\/td>\n<td>TERM (software termination signal)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How do I use kill command?<\/h2>\n<p>Terminate the processes with pids 1412 and 1157:<\/p>\n<pre>$ kill 1412 1157<\/pre>\n<p>Send the hangup signal (SIGHUP) to the process with pid 5071:<\/p>\n<pre># kill -s HUP 5071<\/pre>\n<hr \/>\n<h2>Determining Your Current Directory<\/h2>\n<p>While the general answer is <strong>pwd<\/strong>, note that this may give different results depending on how you reached a given directory and whether the route included symbolic links.<\/p>\n<p>For instance if you have a directory called <strong>real<\/strong>, and a symbolic link to that directory called <strong>virtual <\/strong>and you <code>cd<\/code> to the <code>virtual<\/code> directory then <code>pwd<\/code> will show that <code>virtual<\/code> directory name, even though the actual directory you are in is <code>real<\/code>.<\/p>\n<p>To demonstrate:<\/p>\n<pre>$ mkdir real\r\n$ ln -s real virtual\r\n$ cd virtual\r\n$ pwd\r\n\/home\/&lt;username&gt;\/virtual\r\n$ readlink -f .\r\n\/home\/&lt;username&gt;\/real<\/pre>\n<h3>Display username, hostname and current working directory in the prompt<\/h3>\n<p>The PS1 in this example displays the following three information in the prompt:<\/p>\n<ul>\n<li><strong>\\u<\/strong> \u2013 Username<\/li>\n<li><strong>\\h<\/strong> \u2013 Hostname<\/li>\n<li><strong>\\w<\/strong> \u2013 Full path of the current working directory<\/li>\n<\/ul>\n<pre>-bash-3.2$ export PS1=\"\\u@\\h \\w&gt; \"\r\n\r\nramesh@dev-db ~&gt; cd \/etc\/mail\r\nramesh@dev-db \/etc\/mail&gt;<\/pre>\n<p>Make this setting permanent by adding export PS1=\u201d\\u@\\h \\w&gt; \u201d to either .bash_profile (or) .bashrc as shown below.<\/p>\n<pre>ramesh@dev-db ~&gt; vi ~\/.bash_profile (or)\r\nramesh@dev-db ~&gt; vi ~\/.bashrc<\/pre>\n<p>[Note: Add <strong>export PS1=&#8221;\\u@\\h \\w&gt; &#8220;<\/strong> to one of the above files]<\/p>\n<hr \/>\n<h2>The grep command syntax<\/h2>\n<p>The syntax is as follows:<\/p>\n<pre class=\"bash\">\u00a0\r\ngrep'word' filename\r\ngrep'word' file1 file2 file3\r\ngrep'string1 string2' filename\r\ncat otherfile | grep 'something'\r\ncommand grep 'something' \r\ncommand option1 | grep 'data'\r\ngrep --color 'data'fileName<\/pre>\n<h2>How do I use grep command to search a file?<\/h2>\n<p>Search \/etc\/passwd file for boo user, enter:<\/p>\n<pre>$ grep boo \/etc\/passwd<\/pre>\n<p>Sample outputs:<\/p>\n<pre>foo:x:1000:1000:foo,,,:\/home\/foo:\/bin\/ksh<\/pre>\n<h2>UNIX \/ Linux pipes and grep command<\/h2>\n<p>grep command often used with <a href=\"http:\/\/bash.cyberciti.biz\/guide\/Pipes\">shell pipes<\/a>. In this example, show the name of the hard disk devices:<br \/>\n<code># dmesg | egrep '(s|h)d[a-z]'<\/code><br \/>\nDisplay cpu model name:<br \/>\n<code># cat \/proc\/cpuinfo | grep -i 'Model'<\/code><br \/>\nHowever, above command can be also used as follows without shell pipe:<\/p>\n<pre># grep -i 'Model' \/proc\/cpuinfo<\/pre>\n<p>Sample outputs:<\/p>\n<pre>model\t\t: 30\r\nmodel name\t: Intel(R) Core(TM) i7 CPU       Q 820  @ 1.73GHz\r\nmodel\t\t: 30\r\nmodel name\t: Intel(R) Core(TM) i7 CPU       Q 820  @ 1.73GHz<\/pre>\n<hr \/>\n<h2>Change hostname<\/h2>\n<p>Type the following command :<\/p>\n<pre># sudo hostname<\/pre>\n<p>Update file \/etc\/hostname<\/p>\n<pre>root@home:~# nano \/etc\/hostname<\/pre>\n<p><strong>Update hostname home by dell<\/strong><\/p>\n<p>Do NOT Forget to Update alias file too \/etc\/hosts<\/p>\n<pre>root@home:~# nano \/etc\/hosts<\/pre>\n<p>Replace line : 127.0.0.1 home<br \/>\nby line\u00a0 : 127.0.0.1 dell<\/p>\n<p>Register New host file name<\/p>\n<pre>root@home:~# \/etc\/init.d\/hostname.sh start<\/pre>\n<p>root@home:~# hostname<br \/>\ndell<\/p>\n<p>Verify Name Machine after reboot<\/p>\n<pre>root@dell:~#<\/pre>\n<hr \/>\n<h2>Giving root access<\/h2>\n<p>Careful: The following command allows the user to execute sudo commands (root).<\/p>\n<p># or this one should work<\/p>\n<pre>sudo adduser mike sudo<\/pre>\n<p><strong>To disable the root login use<\/strong><\/p>\n<pre># sudo passwd -l root<\/pre>\n<p>To change the default shell of the user to <em>bash<\/em> set the last entry of the corresponding user in the <code>\/usr\/passwd<\/code> file to the <em>\/bin\/bash<\/em> following as in the following example.<\/p>\n<pre>testuser:x:1001:1001::\/home\/testuser:\/bin\/bash<\/pre>\n<hr \/>\n<h2>Zipping files<\/h2>\n<p>To zip or unzip files on the command line you can use the following commands.<\/p>\n<p># Zip all pdf files in the ~\/tmp\/pdf\/ diretory<\/p>\n<pre>zip ~\/targetdir\/myzip.zip ~\/tmp\/pdf<em>\/*.pdf<\/em><\/pre>\n<p># Unzip the zip file<\/p>\n<pre>unzip ~\/targetdir\/myzip.zip<\/pre>\n<p>&nbsp;<\/p>\n<hr \/>\n<p><strong>CREATE USER (with home directory) and group<\/strong><\/p>\n<pre>Useradd \u2013m nagios<\/pre>\n<p>Then create group nagios<\/p>\n<pre>Groupadd nagios<\/pre>\n<hr \/>\n<h2>How to View and Delete Iptables Rules \u2013 List and Flush<\/h2>\n<h3>1. View \/ List All iptables Rules<\/h3>\n<p>When you want to check what rules are in iptables, use \u2013list option as shown below.<\/p>\n<pre># iptables --list<\/pre>\n<h3>Example 1: Iptables list output showing no rules<\/h3>\n<pre># iptables --list\r\nChain INPUT (policy ACCEPT)\r\ntarget     prot opt source               destination         \r\n\r\nChain FORWARD (policy ACCEPT)\r\ntarget     prot opt source               destination         \r\n\r\nChain OUTPUT (policy ACCEPT)\r\ntarget     prot opt source               destination<\/pre>\n<p>The above output shows chain headers. As you see, there are no rules in it.<\/p>\n<h3>Example 2: Iptables list output showing some rules<\/h3>\n<p>When there is a rule to disable ping reply, you have the iptables list output as like the following. You can see the rule in the OUTPUT chain.<\/p>\n<pre># iptables --list\r\nChain INPUT (policy ACCEPT)\r\ntarget     prot opt source               destination         \r\n\r\nChain FORWARD (policy ACCEPT)\r\ntarget     prot opt source               destination         \r\n\r\nChain OUTPUT (policy ACCEPT)\r\ntarget     prot opt source               destination\r\nDROP       icmp --  anywhere             anywhere            icmp echo-request<\/pre>\n<h3>2. Delete iptables Rules using flush option<\/h3>\n<p>When you want to delete all the rules, use the flush option as shown below.<\/p>\n<pre># iptables --flush<\/pre>\n<p>After doing this, your iptables will become empty, and the \u201ciptables -\u2013list\u201d output will look like what is shown in the example 1.<\/p>\n<p>You can also delete (flush) a particular iptable chain by giving the chain name as an argument as shown below.<\/p>\n<pre># iptables --flush OUTPUT<\/pre>\n<h3>3. Adding iptables Rules<\/h3>\n<pre>iptables <code id=\"yui_3_7_2_1_1381000654417_2243\">-A INPUT -p udp -m udp --dport 161 -j ACCEPT<\/code><\/pre>\n<pre>iptables -A OUTPUT -p udp -m udp --sport 161 -j ACCEPT<\/pre>\n<hr \/>\n<h2>List All Ports (both listening and non listening ports)<\/h2>\n<p><strong>Netstat <\/strong>command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc.,<br \/>\n<strong>netstat <\/strong>supports a set of options to display active or passive sockets. The options \u2013t, \u2013u, \u2013w, and \u2013x show active TCP, UDP, RAW, or Unix socket connections. If you provide the \u2013a flag in addition, sockets that are waiting for a connection (i.e., listening) are displayed as well. This display will give you a list of all servers that are currently running on your system.<br \/>\nSome useful samples :<\/p>\n<pre>netstat -an | grep udp<\/pre>\n<pre>netstat -nlpu | grep snmp<\/pre>\n<pre>netstat -nlpt<\/pre>\n<h3>Checking ports (telnet ip port_number)<\/h3>\n<p>To list tcp ports that are being listened on, along with the name of each listener&#8217;s daemon and its PID, run:<\/p>\n<pre>sudo netstat -plnt<\/pre>\n<p>The following example shows netstat&#8217;s output for three common programs that are listening on three different sockets.<\/p>\n<pre>$ sudo netstat -plnt <\/pre>\n<p>Active Internet connections (only servers) <\/p>\n<pre>Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID\/Program name   \r\ntcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      3686\/mysqld            \r\ntcp        0      0 :::443                      :::*                        LISTEN      2218\/httpd          \r\ntcp        0      0 :::80                       :::*                        LISTEN      2218\/httpd          \r\ntcp        0      0 :::22                       :::*                        LISTEN<\/pre>\n<h4>List all ports using netstat -a<\/h4>\n<pre># netstat -a | more\r\nActive Internet connections (servers and established)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State\r\ntcp        0      0 localhost:30037         *:*                     LISTEN\r\nudp        0      0 *:bootpc                *:*                                \r\n\r\nActive UNIX domain sockets (servers and established)\r\nProto RefCnt Flags       Type       State         I-Node   Path\r\nunix  2      [ ACC ]     STREAM     LISTENING     6135     \/tmp\/.X11-unix\/X0\r\nunix  2      [ ACC ]     STREAM     LISTENING     5140     \/var\/run\/acpid.socket<\/pre>\n<h4>List all tcp ports using netstat -at<\/h4>\n<pre># netstat -at\r\nActive Internet connections (servers and established)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State\r\ntcp        0      0 localhost:30037         *:*                     LISTEN\r\ntcp        0      0 localhost:ipp           *:*                     LISTEN\r\ntcp        0      0 *:smtp                  *:*                     LISTEN\r\ntcp6       0      0 localhost:ipp           [::]:*                  LISTEN<\/pre>\n<h4>List all udp ports using netstat -au<\/h4>\n<pre># netstat -au\r\nActive Internet connections (servers and established)\r\nProto Recv-Q Send-Q Local Address           Foreign Address         State\r\nudp        0      0 *:bootpc                *:*\r\nudp        0      0 *:49119                 *:*\r\nudp        0      0 *:mdns                  *:*<\/pre>\n<hr \/>\n<h2>Locating Files :<\/h2>\n<p>The <code>find<\/code> command is used to locate files on a Unix or Linux system.\u00a0 <code>find<\/code> will search any set of directories you specify for files that match the supplied <em>search criteria<\/em>.\u00a0 You can search for files by name, owner, group, type, permissions, date, and other criteria.\u00a0 The search is recursive in that it will search all subdirectories too.\u00a0 The syntax looks like this:<\/p>\n<pre>find <em>where-to-look criteria what-to-do<\/em><\/pre>\n<p>All arguments to <code>find<\/code> are optional, and there are defaults for all parts.\u00a0 (This may depend on which version of <code>find<\/code> is used.\u00a0 Here we discuss the freely available Gnu version of <code>find<\/code>, which is the version available on <code>YborStudent<\/code>.)\u00a0 For example, <code><em>where-to-look<\/em><\/code> defaults to <code>.<\/code> (that is, the current working directory), <code><em>criteria<\/em><\/code> defaults to none (that is, select all files), and <code><em>what-to-do<\/em><\/code> (known as the <code>find<\/code> <em>action<\/em>) defaults to <code>\u2011print<\/code> (that is, display the names of found files to standard output).\u00a0 Technically, the criteria and actions are all known as <code>find<\/code> <em>primaries<\/em>.<\/p>\n<p>For example:<\/p>\n<pre>find<\/pre>\n<p>will display the pathnames of all files in the current directory and all subdirectories.\u00a0 The commands<\/p>\n<pre>find . -print\r\nfind -print\r\nfind .<\/pre>\n<p>do the exact same thing.\u00a0 Here&#8217;s an example <code>find<\/code> command using a search criterion and the default action:<\/p>\n<pre>find \/ -name foo<\/pre>\n<p>This will search the whole system for any files named <code>foo<\/code> and display their pathnames.\u00a0 Here we are using the criterion <code>-name<\/code> with the argument <code>foo<\/code> to tell <code>find<\/code> to perform a name search for the filename <code>foo<\/code>.\u00a0 The output might look like this:<\/p>\n<pre>\/home\/wpollock\/foo\r\n\/home\/ua02\/foo\r\n\/tmp\/foo<\/pre>\n<p>If <code>find<\/code> doesn&#8217;t locate any matching files, it produces no output.<\/p>\n<p>The above example said to search the whole system, by specifying the root directory (\u201c<code>\/<\/code>\u201d) to search.\u00a0 If you don&#8217;t run this command as root, <code>find<\/code> will display a error message for each directory on which you don&#8217;t have read permission.\u00a0 This can be a lot of messages, and the matching files that are found may scroll right off your screen.\u00a0 A good way to deal with this problem is to redirect the error messages so you don&#8217;t have to see them at all:<\/p>\n<pre>find \/ -name foo <strong>2&gt;\/dev\/null<\/strong><\/pre>\n<p>You can specify as many places to search as you wish:<\/p>\n<pre>find \/tmp \/var\/tmp . $HOME -name foo<\/pre>\n<hr \/>\n<h2>How to check if package is installed (quickly)<\/h2>\n<p>On your terminal:<\/p>\n<pre>apt-cache policy bridge-utils<\/pre>\n<p>If it&#8217;s installed, it will display the version installed, if it&#8217;s not, it will display the lines of text below:<br \/>\nCode:<\/p>\n<pre>bridge-utils:\r\n  Installed: (none)\r\n  Candidate: 1.2-1build1\r\n  Version table:\r\n     1.2-1build1 0\r\n        500 http:\/\/archive.ubuntu.com gutsy\/main Packages<\/pre>\n<h2>How to check the installed packages list<\/h2>\n<p>Type the following command to get list of all installed software:<\/p>\n<pre># dpkg --get-selections<\/pre>\n<hr \/>\n<h3 id=\"avec_apt-get\">How to delete a package install with apt-get<\/h3>\n<p>Simple delete without associated files :<\/p>\n<pre>sudo apt-get remove mon-paquet<\/pre>\n<p>Complete delete\u00a0 :<\/p>\n<pre>sudo apt-get purge mon-paquet<\/pre>\n<hr \/>\n<h2>\u00a0Ubuntu Openn SSH Installation<\/h2>\n<p>Type the following two command to install both ssh client and server:<\/p>\n<pre># sudo apt-get install openssh-server openssh-client<\/pre>\n<pre># sudo start ssh<\/pre>\n<p>or you can use this command :<\/p>\n<pre># sudo \/etc\/init.d\/ssh start<\/pre>\n<hr \/>\n<h2>\u00a0Reboot Server Linux<\/h2>\n<p>Type the following command :<\/p>\n<pre># sudo reboot\r\nor\r\n# sudo shutdown -r now<\/pre>\n<hr \/>\n<h2>Restart Apache 2 web server, enter :<\/h2>\n<p>If you are using Ubuntu use sudo:<br \/>\n$ sudo \/etc\/init.d\/apache2 restart<br \/>\nTo stop Apache 2 web server, enter:<br \/>\n# sudo \/etc\/init.d\/apache2 stop<\/p>\n<hr \/>\n<h2>Configuring a static IP address on Ubuntu \/ Debian<\/h2>\n<p>First of all perform :<\/p>\n<pre>ifconfig<\/pre>\n<p>Login to the server using your root account. Type the following to edit the interfaces file :<\/p>\n<pre>sudo nano \/etc\/network\/interfaces<\/pre>\n<p>Look for the following line in the file:<\/p>\n<pre>iface eth0 inet dhcp<\/pre>\n<p>and change it to<\/p>\n<pre>iface etho inet static<\/pre>\n<p>Below that line add the following lines, changing the addresses as necessary<\/p>\n<pre>address 192.168.1.1\r\nnetmask 255.255.255.0\r\ngateway 192.168.1.254<\/pre>\n<p>If you are using nano, Hit Ctrl-X, Y and enter to save and exit<br \/>\n<strong>Reboot the server for the static IP to take effect.<\/strong><\/p>\n<pre>sudo reboot<\/pre>\n<hr \/>\n<h2>Linux Server behind a corporate Firewall like TMG or Juniper :<\/h2>\n<p>If you are a proxy server so check the file <code>\/etc\/apt\/apt.conf<\/code><\/p>\n<p>The contents were,<\/p>\n<pre><code>Acquire::http::proxy \"http:\/\/&lt;proxy&gt;:&lt;port&gt;\";\r\nAcquire::ftp::proxy \"ftp:\/\/&lt;proxy&gt;:&lt;port&gt;\";\r\nAcquire::https::proxy \"https:\/\/&lt;proxy&gt;:&lt;port&gt;\";\r\n<\/code><\/pre>\n<p>This was the reason why you could reach proxy but couldn&#8217;t get past it, since there is no username password information. So just put that info into it..<\/p>\n<pre><code>Acquire::http::proxy \"http:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt;\/\";\r\nAcquire::ftp::proxy \"ftp:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt;\/\";\r\nAcquire::https::proxy \"https:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt;\/\";\r\n<\/code><\/pre>\n<p>save the file and you are done&#8230;<\/p>\n<hr \/>\n<p>Note: More better add these lines in another file, <code>\/etc\/apt\/apt.conf.d\/80proxy<\/code>. This will ensure that after a version upgrade changes won&#8217;t be lost.<\/p>\n<p>For my corporate network I was given by my administrator the proxy name in the format:<\/p>\n<pre><code>http:\/\/[username]:[password]@[proxy-webaddress]:[port]\r\n<\/code><\/pre>\n<p>For our Windows network our username is in the format:<\/p>\n<pre><code>[domain]\\[username]\r\n<\/code><\/pre>\n<p>For example:<\/p>\n<pre><code>http:\/\/mywindowsdomain\\fossfreedom:password@askubuntu-proxy.com:8080\r\n<\/code><\/pre>\n<hr \/>\n<p>See How to <a title=\"Install and setup an apache web server\" href=\"http:\/\/www.extradrm.com\/?p=1358\">install and setup apache2<\/a><\/p>\n<p>See also how to <a title=\"Default File Permissions Apache \/var\/www\/\" href=\"http:\/\/www.extradrm.com\/?p=37\">set apache2 web permissions<\/a><\/p>\n<p>See also how to <a title=\"How to change timezone on Apache Webserver\" href=\"http:\/\/www.extradrm.com\/?p=1348\">set date.timezone in apache<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Useful Linux Command : To have a root shell as root. # sudo su To have a root shell as \/you\/. # sudo -s Try both and do an echo $HOME to see the&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2843,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[34,209,14],"tags":[175,218,228,229,230],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/321"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=321"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/321\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2843"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}