- Free Terminal Program Download
- How To Make A Terminal Program For Mac Os X
- How To Make A Terminal File Mac Os
- How To Use Terminal On Mac
- Terminal Program Free
In short, be careful before using Terminal to execute commands, and make sure you understand what you're typing. You can also use Terminal to securely connect to other machines, web servers, and even create your own scripts, but those are how-tos for another day. On Mac computers, Ping also refers to a social network feature of iTunes. Don’t confuse this with the ping network utility, which is a separate program. References (4).
Feel the need for speed? Since its early days, OS X has supported multiple RAID types using appleRAID, software that Apple created. appleRAID is actually part of diskutil, the command line tool used for formatting, partitioning, and repairing storage devices on a Mac.
Up until OS X El Capitan, RAID support was built into the Disk Utility app, which allowed you to create and manage your RAID arrays using a standard Mac app that was easy to use. For some reason, Apple dropped the RAID support in the El Capitan version of the Disk Utility app but kept appleRAID available for those willing to use Terminal and the command line.
Use Terminal to Create and Manage a RAID 0 (Striped) Array in OS X
We hope the removal of RAID support from Disk Utility was just an oversight, likely caused by time constraints in the development process. But we don’t really expect to see RAID return to Disk Utility anytime soon.
So, with that in mind, I’m going to show you how to create new RAID arrays, and how to manage both the RAID arrays you create and pre-existing ones from early versions of OS X.
appleRAID supports striped (RAID 0), mirrored (RAID 1), and concatenated (spanning) types of RAID. You can also create nested RAID arrays by combining the basic types to create new ones, such as RAID 0+1 and RAID 10.
This guide will provide you with the basics of creating and managing a striped RAID array (RAID 0).
What You Need to Create a RAID 0 Array
- Two or more drives that can be dedicated as slices in your striped RAID array.
- A current backup; the process of creating a RAID 0 array will erase all of the data on the drives used.
- About 10 minutes of your time.
Using diskutil list Command to Create a Striped RAID for Your Mac
Using Terminal to create a RAID 0 array, also known as a striped array, is an easy process that can be performed by any Mac user. No special skills are necessary, although you may find the Terminal app a bit strange if you've never used it before.
Before We Begin
We're going to create a striped RAID array to increase the speed at which data can be written to and read from a storage device. Striped arrays provide a speed increase, but they also increase the possibility of failure. A failure of any single drive that makes up a striped array will cause the entire RAID array to fail. There's no magical method to recover data from a failed striped array, which means you should have a very good backup system that you can use to restore data, should a failure of the RAID array occur.
Getting Ready
In this example, we're going to use two disks as slices of the RAID 0 array. Slices are just the nomenclature used to describe the individual volumes that make up the elements of any RAID array.
You could use more than two disks; adding more disks will increase performance as long as the interface between the drives and your Mac can support the additional speed. But our example is for a basic minimum setup of two slices to make up the array.
What Type of Drives Can Be Used?
Just about any drive type can be used; hard drives, SSDs, even USB flash drives. Although not a strict requirement of RAID 0, it's a good idea for the drives to be identical, both in size and model.
Back up Your Data First
Remember, the process of creating the striped array will erase all data on the drives that will be used. Make sure you have a current backup before you begin.
Creating the Striped RAID Array
It's possible to use a partition from a drive that has been divided into multiple volumes. But while it's possible, it's not recommended. It's better to dedicate an entire drive to be a slice in your RAID array, and that's the approach we'll take in this guide.
If the drives you're planning to use haven't yet been formatted as a single volume using OS X Extended (Journaled) as the file system, please use one of the following guides:
Once the drives are properly formatted, it’s time to combine them into your RAID array.
- Launch Terminal, located at /Applications/Utilities/.
- Enter the following command at the prompt in Terminal. You can copy/paste the command to make the process a bit easier: diskutil list
- This will cause Terminal to display all of the drives connected to your Mac, along with the drive identifiers we'll need when creating the RAID array. Your drives will be displayed by the file entry point, usually /dev/disk0 or /dev/disk1. Each drive will have its individual partitions displayed, along with the size of the partition and the identifier (the name).
The identifier will likely not be the same as the name you used when you formatted your drives. As an example, we formatted two drives, giving them the name Slice1 and Slice2. In the image above, you can see that Slice1’s identifier is disk2s2, and Slice2's is disk3s2. It's the identifier that we'll use on the next page to actually create the RAID 0 array.
Create a Striped RAID Array in OS X Using Terminal
So far, we've gone over what you need to create a RAID 0 array using Terminal, and used the diskutil list command to get a list of the attached drives connected to your Mac. We then used that list to find the identifier names associated with the drives we intend to use in our striped RAID. If you need to, you can return to page 1 or page 2 of this guide to catch up.
If you’re ready to create the striped RAID array, let's get started.
Terminal Command to Create a Striped RAID Array for a Mac
- Terminal should still be open; if not, launch the Terminal app located at /Applications/Utilities/.
- On page 2, we learned that the identifiers for the drives we want to use are disk2s2 and disk3s2. Your identifiers may be different, so be sure to replace our example identifiers in the command below with the correct ones for your Mac.
- Warning: The process of creating the RAID 0 array will erase any and all content currently on the drives that will make up the array. Be sure that you have a current backup of the data if needed.
- The command we're going to use is in the following format: Diskutil appleRAID create stripe NameofStripedArray Fileformat DiskIdentifiers
- NameofStripedArray is the name of the array that will be shown when mounted on your Mac's desktop.
- FileFormat is the format that will be used when the striped array is created. For Mac users, this will likely be hfs+.
- DiskIdentifers is the identifier names we discovered on page 2 using the diskutil list command.
- Enter the following command at the Terminal prompt. Be sure to change the drive identifiers to match your specific situation, as well as the name you wish to use for the RAID array. The command below can be copy/pasted into Terminal. An easy method for doing this is to triple-click on one of the words in the command; this will cause the entire command text to be selected. You can then copy/paste the command into Terminal: Diskutil appleRAID create stripe FastFred HFS+ disk2s2 disk3s2
- Terminal will display the process of building the array. After a short time, the new RAID array will mount on your desktop and Terminal will display the following text: “Finished RAID operation.”
You're all set to start using your speedy new striped RAID.
Delete a Striped RAID Array Using Terminal in OS X
Now that you have created a striped RAID array for your Mac, at some point you're probably going to find a need to delete it. Once again the Terminal app combined with the diskutil command line tool can let you delete the RAID 0 array and return each RAID slice for use as individual volumes on your Mac.
Deleting a RAID 0 Array Using Terminal
Deleting your striped array will cause all date on the RAID to be erased. Make sure you have a backup before proceeding.
- Launch the Terminal app located at /Applications/Utilities/.
- The RAID delete command only requires the RAID name, which is the same as the name of the array when it is mounted on your Mac’s desktop. As such there is no reason to use the diskutil list command as we did on page 2 of this guide.
- Our example for creating a RAID 0 array resulted in a RAID array named FastFred, were going to use this same example for deleting the array.
- At the Terminal prompt enter the following, be sure and replace FastFred with the name of your striped RAID that you wish to delete. You can triple-click one of the words in the command to select the entire command line, then copy/paste the command into Terminal: Diskutil AppleRAID delete FastFred
- The results of the delete command will be to unmount the RAID 0 array, take the RAID offline, break the RAID into its individual elements. What does not happen is also important the individual drives that made up the array are not remounted or properly formatted.
Free Terminal Program Download
You can use Disk Utility to reformat the drives so they are once again usable on your Mac.
Every Monday (or in this case, Tuesday), we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!
While using Terminal, you may discover that you constantly run a string of commands so often, it's ridiculous that you have to type them in at all. Well, just as you can create shortcuts to applications and automate actions in OS X, you can also do so for Terminal commands that are in constant rotation. These are called aliases, and you can set them up to run temporarily or permanently through your Mac’s command line interface.
How To Make A Terminal Program For Mac Os X
Creating a Temporary Alias
To create a temporary alias that is good for the current terminal session, you will use the following format to create the alias:
alias new_name='command to be performed'
How To Make A Terminal File Mac Os
Just about any command can be used to create an alias, but we'll use this sample command throughout this how to. This command will let us jump to our Documents folder just by typing in 'documents':
alias documents='cd /Documents'
Once the command has been assigned to its alias, you can type in the alias name followed by the enter key to perform the action assigned to the alias.
Recording Aliases Permanently
If you assign an alias using the above method, then it will only be available for the current terminal session. Once you close the terminal window, the alias will no longer be available. To make the alias permanent, you will need to edit a file called “.bash_profile” by running the following command:
nano /.bash_profile
How To Use Terminal On Mac
This will open nano (a command line text editor). Use the arrow keys to place the cursor at the bottom of the file, and type in the aliases that you wish to use, one per line, just as you did when creating temporary aliases. When you are done, press Control + O (Write Out) to save the file. Press Command + X to exit nano and go back to the command line.
Terminal Program Free
When you quit and re-open the Terminal application, your aliases will work without having to re-create them each time.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author, Cory Bohon on Twitter.