{"id":157,"date":"2016-05-08T02:11:38","date_gmt":"2016-05-08T02:11:38","guid":{"rendered":"http:\/\/mal-home.dyndns.org\/wordpress\/?page_id=157"},"modified":"2017-08-21T22:35:04","modified_gmt":"2017-08-21T22:35:04","slug":"linux-tips-and-tricks","status":"publish","type":"page","link":"https:\/\/avitech.com.au\/?page_id=157","title":{"rendered":"Linux tips and tricks"},"content":{"rendered":"<h4>How do I change the hostname of my RPi?<\/h4>\n<p>You need to do 3 things:<\/p>\n<ol>\n<li>sudo nano vi \/etc\/hostname. You&#8217;ll find the existing hostname in this file. Update the hostname as desitred, then save and exit.<\/li>\n<li>sudo nano \/etc\/hosts. Look for any occurrence of the old hostname in here. Update them, then save and exit.<\/li>\n<li>sudo reboot<\/li>\n<\/ol>\n<p>This technique is derived from the website of <a href=\"http:\/\/simonthepiman.com\/how_to_rename_my_raspberry_pi.php\" target=\"_blank\">Simon the Pi Man<\/a>.<\/p>\n<hr \/>\n<h4>Changing the root of WordPress website<\/h4>\n<p>When I first installed WordPress natively, my home page appeared at http:\/\/[website name]\/wordpress.\u00a0 I wanted it to be at http:\/\/[website name].<\/p>\n<p>Here&#8217;s what I had to do to fix it:<\/p>\n<pre>root@n36l:\/opt\/wordpress-4.5.1-0\/apps\/wordpress# .\/bnconfig --appurl \/\r\nroot@n36l:\/opt\/wordpress-4.5.1-0\/apps\/wordpress# .\/bnconfig --disable_banner 1\r\nroot@n36l:\/opt\/wordpress-4.5.1-0# \/opt\/wordpress-4.5.1-0\/ctlscript.sh restart apache\r\nSyntax OK\r\n\/opt\/wordpress-4.5.1-0\/apache2\/scripts\/ctl.sh : httpd stopped\r\nSyntax OK\r\n\/opt\/wordpress-4.5.1-0\/apache2\/scripts\/ctl.sh : httpd started at port 80\r\nroot@n36l:\/opt\/wordpress-4.5.1-0#<\/pre>\n<hr \/>\n<h4>Restarting my native install of Bitnami WordPress<\/h4>\n<p>To restart the entire stack:<\/p>\n<pre>malcolm@n36l:~$ sudo -s\r\n[sudo] password for malcolm:\r\nroot@n36l:~# cd \/opt\/wordpress-4.5.1-0\/\r\nroot@n36l:\/opt\/wordpress-4.5.1-0# .\/ctlscript.sh restart\r\nSyntax OK\r\n\/opt\/wordpress-4.5.1-0\/apache2\/scripts\/ctl.sh : httpd stopped\r\n\/opt\/wordpress-4.5.1-0\/mysql\/scripts\/ctl.sh : mysql stopped\r\n2016-05-08T23:05:00.445332Z mysqld_safe Logging to '\/opt\/wordpress-4.5.1-0\/mysql\/data\/mysqld.log'.\r\n2016-05-08T23:05:00.530074Z mysqld_safe Starting mysqld.bin daemon with databases from \/opt\/wordpress-4.5.1-0\/mysql\/data\r\n\/opt\/wordpress-4.5.1-0\/mysql\/scripts\/ctl.sh : mysql  started at port 3306\r\nSyntax OK\r\n\/opt\/wordpress-4.5.1-0\/apache2\/scripts\/ctl.sh : httpd started at port 80\r\nroot@n36l:\/opt\/wordpress-4.5.1-0#\r\n<\/pre>\n<hr \/>\n<h4>Finding and searching files<\/h4>\n<p>To find files in the entire filesystem:<\/p>\n<pre>\r\nmalcolm@n36l:~$ locate -i process.txt\r\n<\/pre>\n<p>To find text in files in the current directory recursively:<\/p>\n<pre>\r\nmalcolm@n36l:~$ grep -Iri 'mscp'\r\n<\/pre>\n<p>(I = ignore binary files, r = recursive search, i = case insensitive)<\/p>\n<h4>Setting up a shared folder for Ubuntu under VirtualBox<\/h4>\n<p>On my X1 Carbon I am running Ubuntu 14.04 Desktop 32-Bit under VirtualBox. <\/p>\n<p>I wanted to re-establish a shared folder (on the host machine) that can be accessed from within Ubuntu.  I did have this working on my HP8440 (where I first created this VirtualBox .VDI file), but since I&#8217;ve created the new virtual machine on the X1 Carbon, I need to re-establish the shared folder.<\/p>\n<p>I am using this webpage for guidance -> <a href=\"https:\/\/www.howtogeek.com\/187703\/how-to-access-folders-on-your-host-machine-from-an-ubuntu-virtual-machine-in-virtualbox\/\" target=\"_blank\">How to Access Folders on Your Host Machine from an Ubuntu Virtual Machine in VirtualBox<\/a><\/p>\n<p>I know that my Ubuntu image already has &#8220;VirtualBox Guest Additions&#8221; loaded, as I received a message inviting me to update it, which I didn&#8217;t do.<\/p>\n<p>The process is as follows:<\/p>\n<ul>\n<li>Shutdown the virtual machine.<\/li>\n<li>In Virtual Box, with your Guest virtual machines selected in the left panel, click on &#8220;Settings&#8221; for your virtual machine.<\/li>\n<li>Select &#8220;Shared Folders&#8221; in the left panel.<\/li>\n<li>In the right margin, click on &#8220;+&#8221; to add a shared folder.<\/li>\n<li>In the dialogue box that appears:\n<ul>\n<li>In &#8220;Folder Path&#8221;, navigate to the name of the folder of the host machine that you want to share<\/li>\n<li>The &#8220;Folder Name&#8221; box will auto-populate with the lowest-level directory that appears in the Folder Path box. No need to change this<\/li>\n<li>Tick the &#8220;Auto-mount&#8221; check box<\/li>\n<\/ul>\n<li>Click &#8220;OK&#8221; to close the Shared Folders dialogue box.<\/li>\n<li>Start your Guest Machine.<\/li>\n<li>Look at the \/media directory (ie &#8220;ls -l \/media&#8221;). You should see a directory there that starts with &#8220;sf_&#8221; with the Folder Name from above at the end *eg &#8220;sf_ubuntu_shared_folder&#8221;). Try to access it. You probably won&#8217;t be able to, because you need to deal with a permissions issue. You can see from the &#8220;ls -l&#8221; command that the group name for this folder is &#8220;vboxsf. You need to add your username to that group.<\/li>\n<li>You can check which groups you are a member of by using the command &#8220;id [username]&#8221;.<\/li>\n<li>To add yourself to the vboxsf group, use the command &#8220;sudo adduser [username] vboxsf&#8221;.<\/li>\n<p>You should now be able to access (from inside the Guest Machine) the files in your shared folder (which is on the Host Machine).<\/li>\n<\/ul>\n<h4>Changing Ubuntu 14.04 to console login<\/h4>\n<p>I used <a href=\"http:\/\/ubuntuhandbook.org\/index.php\/2014\/01\/boot-into-text-console-ubuntu-linux-14-04\/\" target=\"_blank\">this technique<\/a> to modify Ubuntu (running under VirtualBox on my X1 Carbon laptop).<\/p>\n<p>The technique worked fine, but what I didn&#8217;t count on is that it stops xterm from being able to startup, and so breaks the integration between SIMH and SerialDisk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How do I change the hostname of my RPi? You need to do 3 things: sudo nano vi \/etc\/hostname. You&#8217;ll find the existing hostname in this file. Update the hostname as desitred, then save and exit. sudo nano \/etc\/hosts. Look for any occurrence of the old hostname in here. Update them, then save and exit. ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/avitech.com.au\/?page_id=157\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-157","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P7xTsk-2x","jetpack-related-posts":[{"id":2447,"url":"https:\/\/avitech.com.au\/?page_id=2447","url_meta":{"origin":157,"position":0},"title":"SerialDisk Operational Notes","author":"malcolm","date":"1-August-2017","format":false,"excerpt":"I use Kyle Owen's excellent SerialDisk software to run OS\/8 on my PDP-8\/e. This page sets out my notes relating to the ongoing care and maintenance of my existing SerialDisk setup. It does not explain how to initially setup SerialDisk. Note: I also have a separate webpage (not yet on\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2735,"url":"https:\/\/avitech.com.au\/?page_id=2735","url_meta":{"origin":157,"position":1},"title":"SCSI2SD on QBUS PDP-11","author":"malcolm","date":"15-October-2017","format":false,"excerpt":"Until recently I was using an MFM hard drive as the primary hard drive on my QBUS PDP-11 systems. Typically this would be an RD31 (ST-225) on an RQDX3 MSCP controller. Over time, I am converting to using an 8GB microSDHC card as the primary hard drive. This is achieved\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7532,"url":"https:\/\/avitech.com.au\/?page_id=7532","url_meta":{"origin":157,"position":2},"title":"ARpiCADE","author":"malcolm","date":"15-November-2022","format":false,"excerpt":"I first started experimenting with ARpiCADE in November 2022. These notes relate to version 3.X (for RPi 3). The standard 3.X distribution does NOT have ssh enabled. You need to add a blank file called ssh to the BOOT partition to enable this. Here are some random notes, for future\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":34,"url":"https:\/\/avitech.com.au\/?page_id=34","url_meta":{"origin":157,"position":3},"title":"Installing VAX BASIC 3.3","author":"malcolm","date":"4-May-2016","format":false,"excerpt":"BASIC was available from DEC as a \"layered product\" for VAX\/VMS systems. I'm running VMS 5.3 on my circa-1989 VAX. So I figured it was appropriate to install a version of BASIC from around the same time period: VAX BASIC 3.3. The first challenge was finding a copy of this\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12693,"url":"https:\/\/avitech.com.au\/?page_id=12693","url_meta":{"origin":157,"position":4},"title":"PDP-8 notes: Dumprest and paper-tape diagnostics","author":"malcolm","date":"29-June-2025","format":false,"excerpt":"These are my rough notes about using paper-tape diagnostics and dumprest on the PDP-8. This page focuses in particular on using dumprest on a Windows machine in a Cygwin environment. I have a separate page here that provides some tips for setting up Cygwin. Dumprest Dumprest is a series of\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3267,"url":"https:\/\/avitech.com.au\/?page_id=3267","url_meta":{"origin":157,"position":5},"title":"OMNIBUS Bootstrap Loader Project &#8211; Design Notes","author":"malcolm","date":"26-April-2018","format":false,"excerpt":"I am in the process of developing a multi-device \"Omnibus Bootstrap Loader\" board. The purpose of this project is to transfer bootstrap loader code into the PDP-8's core memory, using a similar technique to DEC's MI8-E board. This page captures my random thoughts and observations throughout the project. Interfacing to\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/avitech.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":11,"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages\/157\/revisions"}],"predecessor-version":[{"id":2524,"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages\/157\/revisions\/2524"}],"wp:attachment":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}