- Putty For Mac
- Run As An Administrator In Terminal For Mac Os Mojave 10 14 4
- Run As Administrator Mac Terminal
- Run Mac Terminal As Admin
On your Mac, select an item, then choose File Get Info. Click the lock icon to unlock it. Enter an administrator name and password. In the Sharing & Permissions section, do any of the following: Add a user or group: Click the Add button below the list, select a user or group, then click Select. Remove a user or group: Select the user or group, then click the Remove button below the list. Jul 10, 2017 This video shows you how to user Terminal on a Mac to switch to an elevated admin account and run sudo commands. This is useful when you are logged into a standard account and need to run sudo.
The Mac makes use of a UNIX-like operating system. And like most Unix or Linux based systems, the command line interface is one of the key methods for interacting with the operating system. The Mac (and many UNIX and Linux systems) also features a graphical user interface to make working with the computer even easier.
Mar 29, 2019 Switch to an administrator within Terminal. Enter the command su - followed by a space and an administrator's username on this computer. Enter that administrator's password. You are now operating as that user. The hyphen in the command is optional, but recommended. Step 1 Start your Mac and log in as an administrator or the root user. To log in as the root user, click 'Other' in the login window, enter 'root' in the 'Name' box and the root user's password in.
macOS Catalina has a number of new features and capabilities, but one change that’s often overlooked is the new shell used in Terminal to interact with the Mac via the command line.
The quick take away is Apple is moving from the Bash (Bourne Again Shell) to a newer Zsh. In this Rocket Yard guide, we’ll look at how this change to Terminal and the command line affects you.
What is a Shell?
At the simplest level, a shell is a program that allows you to control a computer, in this case, a Mac, using commands you enter with the keyboard. Shells are usually interactive text-based interfaces that accept commands and present the results. There are a number of different shells you can use, but if you’re wondering why anyone would want to use a shell and a command line to control a computer, you need to take a trip back in time to the dawn of the computer age.
In those early days, controlling a computer was a daunting task that could require you to manually load memory locations, one at a time, with the data that would eventually be run as a program. In some cases, this was done by setting a row of switches that represented a memory location address, and then loading data into the memory with another set of switches. This process was labor-intensive and prone to errors.
In many cases, the manually loaded program was for a boot loader that allowed the computer to accept input from a paper tape reader.
Once the paper tape reader was operational, you could load a shell program that allowed a Teletype to be used as a command line interface. Ah, those were the days.
Using a shell and a command line was a lot easier for working with a computer than rows and rows of toggle switches.
OK, so the shell was a big improvement back then, but why is it still used today with modern computers?
The Shell and the Mac
The Mac makes use of a UNIX-like operating system. And like most Unix or Linux based systems, the command line interface is one of the key methods for interacting with the operating system. The Mac (and many UNIX and Linux systems) also features a graphical user interface to make working with the computer even easier. But the command line still exists, and for working with core components of the operating system it can be very versatile, providing more capabilities than what is available in the GUI (Graphical User Interface).
The shell controls how the command line is presented to the user and what features the command line supports. Most shells offer the following to some degree or other:
- Shell Syntax: How the shell understands what you enter.
- Shell Commands: The actual commands the shell can execute.
- Shell Functions: The ability to group commands together.
- Shell Parameters: How and where the shell stores values.
- Shell Expansion: How parameters in a command are expanded
- Redirect: Controls the input and output of commands.
- Command Execution: What happens when commands are run.
- Shell Scripts: The ability to run a file containing multiple shell commands.
Why is Apple Changing the Shell?
Apple is changing from the Bash shell to the Zsh (Z Shell). They haven’t said specifically why the change is occurring, but we can make some educated guesses.
Apple has been using the Bash shell since OS X Jaguar but hasn’t updated Bash since version 3.2 was released in 2007. To put that in perspective, the version of Bash used on your Mac was new when the first iPhone was introduced.
Apple is likely using the older version because the licensing for the Bash shell changed from GNU GPL 2 (General Public License) to GNU GPLv3, which includes restrictions that could cause problems for Apple.
Apple muddled along with the older version for quite a few years, but really, it’s time to move on to something more current.
The Zsh included with macOS Catalina is version 5.7.1 and is the most current version at the time of Catalina’s release. It is also uses a less restrictive MIT license that is more to Apple’s liking.
Note: Although Apple is changing to the Zsh in macOS Catalina, when running in Recovery Mode, the Bash shell is still used when you use the Terminal app.Am I Forced to Change the Shell?
Yes, and no. Apple will set the Zsh as the default for any new user account that is created in macOS Catalina or later. If you upgraded your Mac from an earlier version of the macOS, then those existing user accounts are still using the Bash shell.
You are, however, free to upgrade all accounts to Zsh, or downgrade an account to Bash (or for that matter, to any shell you wish to use).
How Different is Zsh?
Putty For Mac
Not very; Bash and Zsh have a very high level of compatibility between them. Both are based on the older Bourne shell. It’s likely most Bash commands and scripts you may be using will run just fine under the Zsh.
The real advantage to the Zsh is the modern features it includes that make working with the shell very easy. This includes auto complete of command entries, and spell checking, a favorite of mine since I often make a typo in a command that Bash would just let go through and then chide me about there being no such command, while Zsh offers to make a correction to my command for me.
For the fumble-fingered like me, that’s reason enough to change to the Zsh.
What About All My Bash Scripts?
They should run fine; if you do come across a script with issues caused by the shell, you can either take the time to upgrade the script, or simply add a Shebang (#!) to force the script to use the Bash shell that is still included with the macOS:
Add the following at the beginning of your Bash scripts to ensure compatibility:
#!/bin/bash
How to Temporarily Change Shells
Zsh has been included with the macOS for quite a while; it just was never the default before. If you would like to temporarily try out the Zsh, do the following:
Launch Terminal, located at /Applications/Utilities.
At the Terminal command prompt, enter:
zsh
Hit enter or return.
The shell being used in the current Terminal session will change to the Zsh and the command prompt will change to a percent sign (%).
You can return to the bash shell by either quitting Terminal, or at the prompt enter:
bash
Hit enter or return.
You can discover more about the Terminal app in the Rocket Yard guide:
Tech 101: Introduction to the Mac’s Terminal App, Part One
Change The Default Shell to Use
No matter which shell Apple sets for you as the default, you can change it with one of two methods:
From the Terminal command line, enter:
chsh -s /bin/zsh
or
chsh -s /bin/bash
Depending on whether you wish to set Zsh or Bash as the default.
Hit enter or return.
You can also set the default shell using System Preferences:
- Launch System Preferences, and select the Users & Groups preference pane.
- Click on the Lock icon in the bottom left corner, then supply your administrator password when requested.
- Right-click on the user account in the sidebar whose default shell you wish to change. From the popup menu, select Advanced Options.
- Locate the item labeled Login shell.
- Use the dropdown menu to select one of the available shells.
Click the OK button when ready.
What About the Warning Message to Change to Zsh?
If you have Bash set as the default and you launch Terminal or open a new Terminal session, you will see the following message:
The default interactive shell is now zsh. To update your account to zsh, please run
chsh -s /bin/zsh
.If you intend to keep using Bash you can remove this message by entering the following at the command prompt:
export BASH_SILENCE_DEPRECATION_WARNING=1
Hit enter or return.
Shell Documentation
It’s beyond the scope of this single article to tell you about the various capabilities of each shell. To do so would really require a book, or two. If you would like to discover more about the Bash and Zsh, you can check out the online documentation about each.
- Z Shell information
- Bash information
Do you use the Terminal app often? And if so, what shell do you prefer to use? Let us know in the comments below.
Be Sociable, Share This!
OWC is on-site wind turbine powered at 8 Galaxy Way, Woodstock, IL 60098 | 1-800-275-4576 | +1-815-338-8685 (International)
All Rights Reserved, Copyright 2018, OWC – Since 1988
macOS Mojave is the best operating system ever and legions of people are trying to install macOS Mojave on their PC. the OS has tons of features that’s why it is in high demand and so far users are using macOS Mojave 10.14. However, the big issue is, when you installed macOS Mojave on Virtualbox using windows then you will see the screen resolution is not working properly. macOS Mojave default screen resolution is 1024×768 and on Virtualbox, this screen resolution is not looking good. Therefore, every user will need to fix the macOS Mojave Screen Resolution on Virtualbox after completing the installation.
However, you will face this problem after installing macOS Mojave, macOS Catalina, macOS High Sierra or any operating system on Virtualbox. although you will face mouse and keyboard stocks during installation, so, there are some problems that you will need to fix. don’t worry, I will give all the solutions step by step.
So, in this article, I will guide you two methods to fix macOS Mojave screen resolution on Virtualbox. but make sure, you are running Virtualbox latest version, in this case, the methods should work accurately.
How to Fix macOS Mojave Screen Resolution on Virtualbox
Installing macOS Mojave or any other Mac operating systems on Virtualbox or Vmware is complicated but after installation, you will see the issue with screen resolution even on Virtualbox and VMWare. it is a very well-known problem for those who installed macOS Mojave on Virtualbox or VMware. after installation, this is the first problem you will see and by default the screen resolution is 1024×768 but you can change it through CMD as an Administrator with one line code. So, here I will show you how you can fix it.
Method 1:
As I mentioned I will show you two methods to fix screen resolutions on Virtualbox, So, in the first method, we will fix screen resolution with the help of two-line codes using CMD as administrator. therefore, let’s start.
#1: Open Virtualbox then select the virtual machine and click the settings button, after that, copy your virtual machine name and paste it somewhere.
#2: Once, you copied the virtual machine name then copy the below code and paste it on the notepad. after that, replace the “Your Virtual Machine Name” with the virtual machine name you copied. therefore, copy the below code and paste it on the Notepad and replace the Name.
Replace Virtual Machine Name
Run As An Administrator In Terminal For Mac Os Mojave 10 14 4
#3: Now, you need to run the code on CMD as Administrator. Therefore, go to Start menu and search for CMD. After that, right-click on the CMD and click the run as administrator.
Once you open CMD then copy the code one by one and paste it on CMD then press Enter button. After that, launch Virtualbox and check the screen resolution. I hope this method works for you because it worked for me.
Paste Code to CMD
Method 2:
In case, if method 1 doesn’t work for you then apply method 2. Here, I will show you to fix macOS Mojave screen resolution within the macOS Mojave terminal. You will need to copy and paste one line code to the terminal and fix the screen resolution.
#1: To find Terminal, go to Launchpad -> Others then here you will see Terminal folder. therefore, double-click the terminal to be opened.
#2: After that, copy the below code and paste it on the terminal. Make sure you have copied the code correctly to not face the problem. If you misspell the words then you will not be able to fix screen resolution.
#3: Once, you paste the code on the terminal and hit the enter button. Then it will ask you to type the user password, therefore, type the password and press enter key.
macOS Mojave terminal
Run As Administrator Mac Terminal
#4: Now, close the terminal and restart macOS Mojave on Virtualbox. And come back and check the screen resolution has been fixed.
Conclusion
That’s all about the macOS Mojave screen resolution problem on Virtualbox that every new user faced after installation. So, I hope the 2 methods worked for you and you fixed the screen resolution successfully. Therefore, if you get any question then feel free to ask me in the comment box.