When you rename a subdirectory under the directory where your Linux or MacOS terminal is open you may get the error message
/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/knife/cookbook_download.rb:45:in `pwd’: No such file or directory – getcwd (Errno::ENOENT)
You need to refresh the directory cache of the terminal.
- Go one level higher
- Go back to the directory
Enable shared folders on the virtual machines
To be able to use shared folders between the host ( your workstation ) and the virtual machine.
- Start the Ubuntu virtual machine in Virtual Box,
- Select the virtual machine window on your workstation,
- In the Devices menu of Virtual Box select Insert Guest Additions CD image…
- Click the Run button,
- Enter your admin password and click Authenticate,
- Select the terminal window and press Enter,
- Restart the virtual machine for the change to take effect,
- In Ubuntu
- Open a terminal window,
- In the upper left corner of the desktop click the Search icon,
- Type terminal into the search box,
- Select the Terminal icon.
- In the Terminal window create a directory for the mount point
sudo chmod 777 ~/host-share
- Mount the Shared Windows location. Get the Machine Folder name from the virtual machine’s Shared Folders tab in VirtualBox
(If you shared the root of a Windows C: drive, the name is “C_DRIVE”.)
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) MY_MACHINE_FOLDER_NAME ~/host-share
Make the mounting permanent
- Create the folder /opt/scripts
- Create a new file in the new folder mount_host_share
# Mount the Host Share to see the host computer's file system
echo MY_PASSWORD | sudo -S mount -t vboxsf -o uid=1000,gid=1000 MY_MACHINE_FOLDER_NAME ~/host-share
- Make the file executable
chmod +x /opt/scripts/mount_host_share
- On the Ubuntu desktop click the Search icon and type startup, and click the Startup Applications icon
- On the Startup Applications Preferences window click Add,
- Enter the Name and this Command, and click Save
The shared drive appears in the File manager.
Relax the password requirement
The virtual machine is already protected by the operating system of the host, your workstation, so it is not necessary to enter the password every time you want to switch to the guest machine. To remove the password requirement
- Click the System Settings icon in the sidebar,
- Uncheck the Waking from suspend and Returning from blank screen checkboxes.
Enable shared folders on the virtual machine
To be able to use shared folders between the host ( your workstation ) and the Windows virtual machine.
- Start the Windows virtual machine in VirtualBox,
- Select the virtual machine window on your workstation,
- In the Devices menu of VirtualBox select Insert Guest Additions CD image…
- In the virtual machine start Windows Explorer,
- Open the VirtualBox Guest Additions CD,
- Start VBoxWindowsAdditions.exe,
The shared folders will be available in the virtual machine’s Windows Explorer as the D: drive
Download VirtualBox from https://www.virtualbox.org/wiki/Downloads and follow the instructions to install it.
At the time of writing, this was the section where the installer files were referenced
Run the downloaded installer file and accept all default values.
The installer starts the application.
Create a virtual machine
To create a new virtual machine
Download the OS image from the manufacturer’s website.
- Start the VirtualBox application
- Click the New icon
- Click the Expert Mode button
- Enter the name, select the operating system type and version, and set the memory size,
- Set the initial size of the virtual hard disk, and click the Create button,
- Select the virtual machine icon and click the Start button
- Click the Browse icon and select the OS image file in the Downloads directory,
- Click the Start button,
Configure VirtualBox for each virtual machine
To share the connectivity of the host computer with the virtual machine, mainly if you use VPN
- In VirtualBox select the virtual machine icon and click Settings
- Select Network
- Attach the network adapter to NAT
If your company use automated software installation and updates, set up a second network connection using the Bridged Adapter. This way the virtual machine will get an independent IP address in the same IP address range as the host machine.
- Select the Adapter 2 tab,
- Select the Enable Network Adapter checkbox,
- Select the Bridged Adapter in the Attached to drop-down,
- In the Name drop-down list select the fastest network connection of the host machine.
Copy and paste
To enable copy and paste between the virtual machine and the host ( your workstation )
- On the General tab of the Settings page select the Bidirectional shared clipboard
Specify the shared folder on your workstation
- In the VirtualBox menu select Preferences
- On the Shared Folders tab click the + icon
- Select your home folder on your workstation
Configure the virtual machine OS
To configure the virtual machine operating system in VirtualBox, see Virtual machine configuration on the VirtualBox page.
When you start a Windows 7 or equivalent server machine, to log in, you need to press CTRL-ALT-DELETE on the keyboard to get the login page. To send Control-Alt-Delete to a Windows virtual machine in Virtual Box from a Macintosh
on a Macintosh laptop press the fn – Command – Delete back keys
on a Macintosh desktop press the Command – Delete forward keys.
When you use Lync to send and receive technical messages, some of the character combinations are displayed as small icons. To turn off this feature
- In the Lync menu select Preferences,
- On the Appearance tab uncheck Show emoticons in instant messages.
When you connect to a Windows computer from your Macintosh workstation the best remote desktop client is the Microsoft Remote Desktop app from the Apple Appstore.
To configure the remote desktop connection for the best experience
- Select Native resolution
- Scale content for Full screen mode
To be able to unselect the “Use all monitors checkbox”, uncheck it first, before you uncheck the “Start session in full screen” checkbox, otherwise, the last checkbox will be disabled.
If you use multiple displays, make sure you open the Microsoft Remote Desktop app on the display you want to use to view the remote computer, because the Native resolution setting will use the resolution of the display the app is running on at the moment you start the remote desktop connection.
There are times when a window opens on your Mac and the header is out of the screen or hiding behind the Macintosh Toolbar.
To move the entire window back to the screen try to find a point on the edge that instead of stretches the window, moves it. Four small regions on the sides can move the window up and down, another two small regions at the bottom can move the window sideways. The locations of the regions are very inconsistent, in one moment they work, a second later the region is at another location.
You can verify the checksum of a file with the built-in features of the operating systems
On Macintosh and Linux
Open the terminal window and execute the commands
shasum -a 256 FILE_NAME
CRC32, CRC64, SHA256, SHA1, BLAKE2sp
Right-click the file in Windows Explorer and select CRC SHA > * (star)
The popup window will show the values, but unfortunately, there is no way to copy them to the clipboard. To be able to copy the hash value to the clipboard open a Bash window on the Windows computer and execute the Macintosh/Linux commands above.
To install Bash on a Windows workstation see the Git section of Install the DevOps development tools on Windows.
After software update in Sierra on my Macintosh, my Bluetooth mouse usually stops working.
The toolbar displays the Bluetooth not available icon:
When I click it, the “Bluetooth: Not Available” message is displayed.
There are two recommended actions we can take to bring Bluetooth back to life. If the first one does not help, try to execute them together during the same shutdown and restart cycle.
Delete the com.apple.Bluetooth.plist file from Library / Preferences
- Start Finder,
- In the Go menu select Go to Folder,
- Enter /Library/Preferences into the text box and click the Go button,
- Move the com.apple.Bluetooth.plist file to the trash,
- Shut down the Macintosh,
- Start the computer again.
Reset the SMC to reinitialize the Bluetooth module
- Shut down the Macintosh,
- Disconnect all peripherals (external display, drives, mouse, printer),
- Make sure the power adapter is connected to the computer,
- Press and hold the Shift, Control and Option buttons for 10 seconds,
- Start the computer with the power button, with the peripherals still disconnected,
- Re-connect the peripherals.