Return to site

Mac Terminal Wifi Hack

broken image


  • To hack the wifi password with WEP/WPA2. This is done by following command on the terminal. This will trigger the router to reconnect/reauthenticate the chosen client. This is how the authentication process can be analyzed. On the terminal with airodump- ng running, a 'WPA handshake' message should appear.
  • Thanks for the A2A. Short answer is that you cannot. Long answer: The mac terminal app is just a GUI interface to communicate with the internal shell i.e. Bash/unix shell.
  • Open Terminal in Applications - Utilities, or type Command (⌘) + space bar to open Spotlight and launch Terminal. To access your Wi-Fi password you'll need your Administrator username, your computer password, and the name of the Wi-Fi network for which you need the password. Inside of Terminal, copy and paste the following command.

In this hi-tech life, we always need a working internet connection to manage both our professional and personal life. The most comfortable way to access internet everywhere anytime is by buying mobile data recharges but they are very expensive. Another good way to connect to free WiFi if it's luckily available at your workplace, college or home. But everyone is not that lucky.

Mac Terminal WIFI Commands I'm seeing over a thousand people a day show up here looking for the mac terminal WiFi commands. The OSX terminal has several command line tools that allow you to manage your WiFi settings. Connecting, disconnecting and scanning for available WiFi networks is easy once you know which command does what.

Everybody might have many fast WiFi hotspots available in their smartphone's range, but they don't have access to those WiFi connections because they are password protected and you don't have access to them so, you can't use those WiFi hotspot to access internet in your smartphone or laptop. But, what if you can hack a WiFi?

Yes, I am not joking. What if you can hack any WiFi available in your range and crack it's password to access free and unlimited internet? IMO, if you can learn a way to hack a WiFi network then you can access free internet everywhere. Right?

So, I am telling you the method to hack a secured WiFi network, crack its password and enjoy free internet using it.

Before moving directly to the methods to hack WiFi networks lets first see what type of security and authentication methods are implemented in WiFi networks.

WiFi Security & Encryption Methods

  • Open – This is WiFi networks with no authentication. Anyone in the WiFi range can connect his device to the network without any password in enjoy free internet. However, these networks are rarely available and also risky.
  • WEP – Wired Equivalent Privacy (WEP) is a security protocol, specified in the IEEE Wireless Fidelity (Wi-Fi) standard, 802.11b, that is designed to provide a wireless local area network (WLAN) with a level of security and privacy comparable to what is usually expected of a wired LAN.
  • WPA – WiFi Protected Access (WPA) is improved and more secured security protocol which arrived with lots of improvements in encryption and authentication methods of WEP.
  • WPA2 PSK – It is short of Wi-Fi Protected Access 2 – Pre-Shared Key which is the latest and most powerful encryption method used in WiFi networks right now.

Hacking WiFi Networks with WEP, WPA and WPA2 PSK Security

As security features have been improved from WEP to WPA to WPA2 PSK WiFi authentication protocol, so obviously, WEP WiFi networks are very easy to hack compared to WPA and WPA2 PSK Security methods.

Almost every password-protected WiFi networks support both WPA/WPA2 PSK authentication. If somebody is already connected to the network, you can check in his network properties to see what encryption-type is being using by the targeted WiFi network.

But if you want to know encryption-type of WiFi network which is not connected to any device in your reach, you need Ubuntu operating system to do this.

In Ubuntu, you can use nmcli command in terminal which is command-line client for NetworkManager. It will show you security types of nearby Wi-Fi access points. Enter the following command in terminal:

It will show you the output like this:

Using the above methods, you should have known the encryption-type of targeted WiFi network which you want to hack. So, I am gonna show you how to hack WiFi Network for each of WEP, WPA and WPA2 PSK secured WiFi networks.

Requirements for Hacking WiFi Netwoks

My methods require KALI Linux which is especially designed Linux distrbution for penetration testing and ethical hacking. You can download it for free from its official site. Download Kali Linux ISO from its website either install it as separate operating system in your system or you can use Virtual Machine/VMware to directly run KALI Linux inside Windows.

You will also need Aircrack-ng which is a security suite to assess WiFi network security. It focuses on different area of WiFi security: monitoring, attacking, testing and cracking.

Another important requirement is to check if your wireless card is compatible with Aircrack-ng or not. Because if it's not compatible, you need to have an Aircrack-ng compatible card. Check it directly here: http://www.aircrack-ng.org/doku.php or run aireplay-ng -9 mon0 command inside terminal to view the percentage of injection your card can do.

Install Aircrack-ng using the following command in KALI LINUX

December 25, 2020 - Biff and Baff Gone Divin', free online games, flash games, free flash games, online games, play game. To play online Biff & Baff do not forget to install: INSTRUCTIONS: I invite you now to play the most attractive game called 'Biff & Baff' an online game published on 23 - June - 2015 and belongs to the category of Ball Games Red Ball, where we will continually provide the newest red ball games for fun. Biff_and_baff_gone_divinanne 28 online, free games. Take Biff and Baff on a tour through 6 worlds with 5 levels each. Roll through all the levels. Collecting stars, keys, opening doors and finally rolling to the finish. Biff and Baff Gone Divin' is a new and popular Fish game for kids. It uses the Flash technology. Play this Water game now or enjoy the many other related games we have at POG.

  • sudo apt-cache search aircrack-ng (to seach aircrack-ng or any related repositories)
  • sudo apt-get install aircrack-ng (to install aircrack-ng repository)

Fulfill only these requirements and you are ready to hack any WiFi network, whether it is a WEP, WPA or WPA2 PSK Wi-Fi.

Steps to hack WiFi Networks

Starting below, I'll be guiding you step-by-step in hacking a secured WiFi network. You can either scroll down to read each and every WiFi hacking method or can directly jump to the required section below using these links:

There are various methods to hack into WiFi network and crack its password for all the above security-types but I am showing only those methods with which I've had success in cracking password of desired WiFi network and hack secured WiFi Access points. So, if you follow these steps correctly, you'll also be able to hack any WiFi hotspot available in your reach. Disclaimereffective curriculum ideas.

How To Hack WEP WiFi Network

In this method, we are going to hack WEP secured WiFi network using packet injection method inside KALI Linux operating system. So, start KALI Linux in your system. Now follow these below steps:

Step 1: Check Wireless Interface

  • Open terminal in Kali Linux and enter the command airmon-ng. It will show you what network interface are you using. In my system, I have only one network interface card wlan0, which is my wireless interface card.
  • Create a network interface which runs in monitor mode. To do this enter command airmon-ng start wlan0.Make sure to replace wlan0 in command with the interface name that your card have. Here, mon0 has been created.
  • Now, you might or might not get the warning appearing in the below screenshot which tells other processes using the network which can create the problem. So, you can kill them using the syntax: kill PID if you know those processes are not important for you at the moment.

Step 2: Scan available WEP WiFi networks

Mac Terminal Hack Wifi Password

  • Now, enter the command airodump-ng mon0 to scan & list down all the available WiFi networks using created monitor interface (mon0). It can take time to all the available WiFi networks in range.
  • Once the process is done,all the available WiFi access points will appear with their important details: BSSID (WiFi Access Point MAC Address), PWR (Signal strength value; the lower, the better), CH (Channel for WiFi), ENC (Encryption type), AUTH, ESSID (Name of WiFi)
  • Select the WiFi network with WEP Encryption (ENC) and lowest PWR value.

Step 3: Attack the selected WEP WiFi Network

  • Open another terminal concurrently and enter command: aidodump-ng -c 1 -w bell –bssid 64:0F:28:6B:A9:B1 mon0. Here, -c 1 indicates channel number which is 1, -w bell is to write data in file 'bell', –bssid 64:0F:28:6B:A9:B1 is MAC address for my selected WiFi access point and mon0 is monitor interface that was created above. Hit Enter and it will start sending packets (visible in #Data) to the WiFi
  • The speed of sending data is very slow but you need to escalate it by attacking the WEP WiFi network. First enter the command airplay-ng -1 0 -a 64:0F:28:6B:A9:B1 mon0 to perform fake authentication (-1 in command) to the network.
  • Now we will perform ARP REPLAY Attack to the WiFi network to climb the data to the network at enormous rate. Useairplay-ng -3 -b 64:0F:28:6B:A9:B1 mon0, where -3 is for ARP REPLAY attack. Hit enter and the command will start doing attack to WEP WiFi Access point and you can see the #Data value increasing at enormously fast rate.
  • In below screenshot the bell-01.cap is the file where data is being stored that we will use to crack the password of this WEP WiFi network once we have enough data (recommended #Data value should be over 35,000).
  • Once you have enough data in the file bell-01.cap, run the command aircrack-ng bell-01.cap. It will test all the data values available in key file and automatically show you the key it found by testing data in file.
  • You can see in above screenshot that we have successfully cracked the password of targeted WEP WiFi network
  • The key found will not be in those text or alphanumeric format that the WiFi owner has created. It will be in hex format but work just fine.
  • Now, to use this key, firstly start the processes you have killed in Step 1 above using the command I have used below.
  • Finally enter the cracked key 61:32:58:94:98 (without colon) as the password of targeted WEP WiFi Network and it will be connected.

Steps to Hack WPA/WPA2 Secured WiFi Network

Hacking into WPA/WPA2 WiFi Network is very tough, time & resource consuming. The technique used to crack WPA/WPA2 WiFi password is 4-way handshake for which there is a requirement to have at least one device connected to the network.

In WPA/WPA2 security method, the allowed password can have both large and small alphabets, numbers and symbols. And, allowed size of password is 64 characters. On a rough guess, if we consider password to be only 8 characters long and eliminate the use of symbols even then if you want to crack WPA or WPA2 WiFi password, using the brute force method the password combinations will be: 826+26+10=62 which is equals to:

  • 98079714615416886934934209737619787751599303819750539264
Hack

So, even in fastest computer you can manage to use, it's going to take hours.

Aircrack-ng have all the tools required to crack into WPA/WPA2 PSK WiFi network. It can perform 4-way handshake by disconnecting/connecting the connected device and capturing WPA handshake. Our friends bike across the united states for a great cause difficulty. It can perform brute-force attack but you can't hope to crack the password if you have wordlist/dictionary for the password (which is already too big in size) with password inside it. I hate to tell you this but yes, doing it on your own can take forever.

However, there is a tricky way to crack WPA/WPA2 WiFi Password quickly which only requires you to be a bit lucky. The tool is fluxion. Fluxion use same 4-way handshake technique to crack secured WPA/WPA2 WiFi access points password but it doesn't require you to have dictionary or perform brute force attack. So yes, it's going to minimize your time to hack WPA or WPA2 WiFi networks password multiple folds.

Mac terminal wifi hacking

Instead of doing this, it performs a little bit of phishing where the already connected user is asked to enter password of WiFi network again for security reason and when the user enter the password, first the handshake is checked with the earlier captured handshake of the device, if handshake is correct that means the password entered by user is correct. Once it is successful, Fluxion returns the key required to authenticate the network.

Steps to crack WPA/WPA2 WiFi Password using Fluxion

  • Scan the networks.
  • Capture a handshake (can't be used without a valid handshake, it's necessary to verify the password)
  • Use WEB Interface *
  • Launch a FakeAP instance to imitate the original access point
  • Spawns a MDK3 process, which deauthenticates all users connected to the target network, so they can be lured to connect to the FakeAP and enter the WPA password.
  • A fake DNS server is launched in order to capture all DNS requests and redirect them to the host running the script
  • A captive portal is launched in order to serve a page, which prompts the user to enter their WPA password
  • Each submitted password is verified by the handshake captured earlier
  • The attack will automatically terminate, as soon as a correct password is submitted

I can understand that not all readers will be able to implement the method after reading such summarized version on hacking WPA/WPA2 PSK WiFi Network. So, below is the video tutorial on cracking WPA2 WiFi Access Point password using Fluxion.

https://youtu.be/4XLUVfoJqo8

Comments below if you face any problem in hacking WEP, WPA and WPA2 PSK WiFi Networks using the above methods.

Must Read –How To Hack a Website using SQL Injection

The Terminal app allows you to control your Mac using a command prompt. Why would you want to do that? Well, perhaps because you're used to working on a command line in a Unix-based system and prefer to work that way. Terminal is a Mac command line interface. There are several advantages to using Terminal to accomplish some tasks — it's usually quicker, for example. In order to use it, however, you'll need to get to grips with its basic commands and functions. Once you've done that, you can dig deeper and learn more commands and use your Mac's command prompt for more complex, as well as some fun, tasks.

Curated Mac apps that keep your Mac's performance under control. Avoid Terminal commands, avoid trouble.

Download Free

How to open Terminal on Mac

The Terminal app is in the Utilities folder in Applications. To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command - spacebar to launch Spotlight and type 'Terminal,' then double-click the search result.

You'll see a small window with a white background open on your desktop. In the title bar are your username, the word 'bash' and the dimensions of the window in pixels. Bash stands for 'Bourne again shell'. There are a number of different shells that can run Unix commands, and on the Mac Bash is the one used by Terminal.

If you want to make the window bigger, click on the bottom right corner and drag it outwards. If you don't like the black text on a white background, go to the Shell menu, choose New Window and select from the options in the list.

If Terminal feels complicated or you have issues with the set-up, let us tell you right away that there are alternatives. MacPilot allows to get access to over 1,200 macOS features without memorizing any commands. Basically, a third-party Terminal for Mac that acts like Finder.

For Mac monitoring features, try iStat Menus. The app collects data like CPU load, disk activity, network usage, and more — all of which accessible from your menu bar.

Basic Mac commands in Terminal

The quickest way to get to know Terminal and understand how it works is to start using it. But before we do that, it's worth spending a little time getting to know how commands work. To run a command, you just type it at the cursor and hit Return to execute.

Every command is made up of three elements: the command itself, an argument which tells the command what resource it should operate on, and an option that modifies the output. So, for example, to move a file from one folder to another on your Mac, you'd use the move command 'mv' and then type the location of the file you want to move, including the file name and the location where you want to move it to.

Let's try it.

  1. Type cd ~/Documentsthen and press Return to navigate to your Home folder.

  2. Type lsthen Return (you type Return after every command).

Mac Terminal Wifi Hacking

You should now see a list of all the files in your Documents folder — ls is the command for listing files.

To see a list of all the commands available in Terminal, hold down the Escape key and then press y when you see a question asking if you want to see all the possibilities. To see more commands, press Return.

Unix has its own built-in manual. So, to learn more about a command type man [name of command], where 'command' is the name of the command you want find out more about.

Hack

Terminal rules

There are a few things you need to bear in mind when you're typing commands in Terminal, or any other command-line tool. Firstly, every character matters, including spaces. So when you're copying a command you see here, make sure you include the spaces and that characters are in the correct case.

You can't use a mouse or trackpad in Terminal, but you can navigate using the arrow keys. If you want to re-run a command, tap the up arrow key until you reach it, then press Return. To interrupt a command that's already running, type Control-C.

Commands are always executed in the current location. So, if you don't specify a location in the command, it will run wherever you last moved to or where the last command was run. Use the cdcommand, followed by a directory path, like in Step 1 above, to specify the folder where you want a command to run.

There is another way to specify a location: go to the Finder, navigate to the file or folder you want and drag it onto the Terminal window, with the cursor at the point where you would have typed the path.

Here's another example. This time, we'll create a new folder inside your Documents directory and call it 'TerminalTest.'

  1. Open a Finder window and navigate to your Documents folder.

  2. Type cd and drag the Documents folder onto the Terminal window.

  3. Now, type mkdir 'TerminalTest'

Go back to the Finder, open Text Edit and create a new file called 'TerminalTestFile.rtf'. Now save it to the TerminalTest folder in your Documents folder.

In the Terminal window, type cd ~/Documents/TerminalTest then Return. Now type lsand you should see 'TerminalTestFile' listed.

To change the name of the file, type this, pressing Return after every step:

  1. cd~/Documents/Terminal Test

  2. mv TerminalTestFile TerminalTestFile2.rtf

That will change the name of the file to 'TerminalTestFile2'. You can, of course, use any name you like. The mv command means 'move' and you can also use it to move files from one directory to another. In that case, you'd keep the file names the same, but specify another directory before typing the the second instance of the name, like this:

mv ~/Documents/TerminalTest TerminalTestFile.rtf ~/Documents/TerminalTest2 TerminalTestFile.rtf

More advanced Terminal commands

Terminal can be used for all sorts of different tasks. Some of them can be performed in the Finder, but are quicker in Terminal. Others access deep-rooted parts of macOS that aren't accessible from the Finder without specialist applications. Here are a few examples.

Copy files from one folder to another
  1. In a Terminal window, type ditto [folder 1] [folder 1] where 'folder 1' is the folder that hosts the files and 'folder 2' is the folder you want to move them to.

  2. To see the files being copied in the Terminal window, type -v after the command.

Download files from the internet
Mac terminal wifi hacking
Mac Terminal Wifi Hack

So, even in fastest computer you can manage to use, it's going to take hours.

Aircrack-ng have all the tools required to crack into WPA/WPA2 PSK WiFi network. It can perform 4-way handshake by disconnecting/connecting the connected device and capturing WPA handshake. Our friends bike across the united states for a great cause difficulty. It can perform brute-force attack but you can't hope to crack the password if you have wordlist/dictionary for the password (which is already too big in size) with password inside it. I hate to tell you this but yes, doing it on your own can take forever.

However, there is a tricky way to crack WPA/WPA2 WiFi Password quickly which only requires you to be a bit lucky. The tool is fluxion. Fluxion use same 4-way handshake technique to crack secured WPA/WPA2 WiFi access points password but it doesn't require you to have dictionary or perform brute force attack. So yes, it's going to minimize your time to hack WPA or WPA2 WiFi networks password multiple folds.

Instead of doing this, it performs a little bit of phishing where the already connected user is asked to enter password of WiFi network again for security reason and when the user enter the password, first the handshake is checked with the earlier captured handshake of the device, if handshake is correct that means the password entered by user is correct. Once it is successful, Fluxion returns the key required to authenticate the network.

Steps to crack WPA/WPA2 WiFi Password using Fluxion

  • Scan the networks.
  • Capture a handshake (can't be used without a valid handshake, it's necessary to verify the password)
  • Use WEB Interface *
  • Launch a FakeAP instance to imitate the original access point
  • Spawns a MDK3 process, which deauthenticates all users connected to the target network, so they can be lured to connect to the FakeAP and enter the WPA password.
  • A fake DNS server is launched in order to capture all DNS requests and redirect them to the host running the script
  • A captive portal is launched in order to serve a page, which prompts the user to enter their WPA password
  • Each submitted password is verified by the handshake captured earlier
  • The attack will automatically terminate, as soon as a correct password is submitted

I can understand that not all readers will be able to implement the method after reading such summarized version on hacking WPA/WPA2 PSK WiFi Network. So, below is the video tutorial on cracking WPA2 WiFi Access Point password using Fluxion.

https://youtu.be/4XLUVfoJqo8

Comments below if you face any problem in hacking WEP, WPA and WPA2 PSK WiFi Networks using the above methods.

Must Read –How To Hack a Website using SQL Injection

The Terminal app allows you to control your Mac using a command prompt. Why would you want to do that? Well, perhaps because you're used to working on a command line in a Unix-based system and prefer to work that way. Terminal is a Mac command line interface. There are several advantages to using Terminal to accomplish some tasks — it's usually quicker, for example. In order to use it, however, you'll need to get to grips with its basic commands and functions. Once you've done that, you can dig deeper and learn more commands and use your Mac's command prompt for more complex, as well as some fun, tasks.

Curated Mac apps that keep your Mac's performance under control. Avoid Terminal commands, avoid trouble.

Download Free

How to open Terminal on Mac

The Terminal app is in the Utilities folder in Applications. To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command - spacebar to launch Spotlight and type 'Terminal,' then double-click the search result.

You'll see a small window with a white background open on your desktop. In the title bar are your username, the word 'bash' and the dimensions of the window in pixels. Bash stands for 'Bourne again shell'. There are a number of different shells that can run Unix commands, and on the Mac Bash is the one used by Terminal.

If you want to make the window bigger, click on the bottom right corner and drag it outwards. If you don't like the black text on a white background, go to the Shell menu, choose New Window and select from the options in the list.

If Terminal feels complicated or you have issues with the set-up, let us tell you right away that there are alternatives. MacPilot allows to get access to over 1,200 macOS features without memorizing any commands. Basically, a third-party Terminal for Mac that acts like Finder.

For Mac monitoring features, try iStat Menus. The app collects data like CPU load, disk activity, network usage, and more — all of which accessible from your menu bar.

Basic Mac commands in Terminal

The quickest way to get to know Terminal and understand how it works is to start using it. But before we do that, it's worth spending a little time getting to know how commands work. To run a command, you just type it at the cursor and hit Return to execute.

Every command is made up of three elements: the command itself, an argument which tells the command what resource it should operate on, and an option that modifies the output. So, for example, to move a file from one folder to another on your Mac, you'd use the move command 'mv' and then type the location of the file you want to move, including the file name and the location where you want to move it to.

Let's try it.

  1. Type cd ~/Documentsthen and press Return to navigate to your Home folder.

  2. Type lsthen Return (you type Return after every command).

Mac Terminal Wifi Hacking

You should now see a list of all the files in your Documents folder — ls is the command for listing files.

To see a list of all the commands available in Terminal, hold down the Escape key and then press y when you see a question asking if you want to see all the possibilities. To see more commands, press Return.

Unix has its own built-in manual. So, to learn more about a command type man [name of command], where 'command' is the name of the command you want find out more about.

Terminal rules

There are a few things you need to bear in mind when you're typing commands in Terminal, or any other command-line tool. Firstly, every character matters, including spaces. So when you're copying a command you see here, make sure you include the spaces and that characters are in the correct case.

You can't use a mouse or trackpad in Terminal, but you can navigate using the arrow keys. If you want to re-run a command, tap the up arrow key until you reach it, then press Return. To interrupt a command that's already running, type Control-C.

Commands are always executed in the current location. So, if you don't specify a location in the command, it will run wherever you last moved to or where the last command was run. Use the cdcommand, followed by a directory path, like in Step 1 above, to specify the folder where you want a command to run.

There is another way to specify a location: go to the Finder, navigate to the file or folder you want and drag it onto the Terminal window, with the cursor at the point where you would have typed the path.

Here's another example. This time, we'll create a new folder inside your Documents directory and call it 'TerminalTest.'

  1. Open a Finder window and navigate to your Documents folder.

  2. Type cd and drag the Documents folder onto the Terminal window.

  3. Now, type mkdir 'TerminalTest'

Go back to the Finder, open Text Edit and create a new file called 'TerminalTestFile.rtf'. Now save it to the TerminalTest folder in your Documents folder.

In the Terminal window, type cd ~/Documents/TerminalTest then Return. Now type lsand you should see 'TerminalTestFile' listed.

To change the name of the file, type this, pressing Return after every step:

  1. cd~/Documents/Terminal Test

  2. mv TerminalTestFile TerminalTestFile2.rtf

That will change the name of the file to 'TerminalTestFile2'. You can, of course, use any name you like. The mv command means 'move' and you can also use it to move files from one directory to another. In that case, you'd keep the file names the same, but specify another directory before typing the the second instance of the name, like this:

mv ~/Documents/TerminalTest TerminalTestFile.rtf ~/Documents/TerminalTest2 TerminalTestFile.rtf

More advanced Terminal commands

Terminal can be used for all sorts of different tasks. Some of them can be performed in the Finder, but are quicker in Terminal. Others access deep-rooted parts of macOS that aren't accessible from the Finder without specialist applications. Here are a few examples.

Copy files from one folder to another
  1. In a Terminal window, type ditto [folder 1] [folder 1] where 'folder 1' is the folder that hosts the files and 'folder 2' is the folder you want to move them to.

  2. To see the files being copied in the Terminal window, type -v after the command.

Download files from the internet

You'll need the URL of the file you want to download in order to use Terminal for this.

  1. cd ~/Downloads/

  2. curl -O [URL of file you want to download]

If you want to download the file to a directory other than your Downloads folder, replace ~/Downloads/ with the path to that folder, or drag it onto the Terminal window after you type the cd command.

Change the default location for screenshots

If you don't want macOS to save screenshots to your Desktop when you press Command-Shift-3, you can change the default location in Terminal

  1. defaults write com.apple.screencapture location [path to folder where you want screenshots to be saved]

  2. Hit Return

  3. killall SystemUIServer

  4. Hit Return

Change the default file type for screenshots

By default, macOS saves screenshots as .png files. To change that to .jpg, do this:

Mac Terminal Wifi Hacker

  1. defaults write com.apple.screencapture type JPG

  2. Press Return

  3. killall SystemUIServer

  4. Press Return

Delete all files in a folder

Mac Terminal Wifi Hack

The command used to delete, or remove, files in Terminal is rm. So, for example, if you wanted to remove a file in your Documents folder named 'oldfile.rtf' you'd use cd ~/Documents to go to your Documents folder then to delete the file. As it stands, that will delete the file without further intervention from you. If you want to confirm the file to be deleted, use -i as in rm -i oldfile.rtf

To delete all the files and sub-folders in a directory named 'oldfolder', the command is rm -R oldfolder and to confirm each file should be deleted, rm -iR oldfolder

Just because you can use Terminal to delete files on your Mac, doesn't mean you should. It's a relatively blunt instrument, deleting only those files and folders you specify.

Another way to free up space

If your goal in removing files or folders is to free up space on your Mac, or to remove junk files that are causing your Mac to run slowly, it's far better to use an app designed for the purpose. CleanMyMac X is one such app.

It will scan your Mac for files and recommend which ones you can delete safely, as well as telling you how much space you'll save. And once you've decided which files to delete, you can get rid of them in a click. You can download CleanMyMac here.


As you can see, while Terminal may look scary and seem like it's difficult to use, it really isn't. The key is learning a few commands, such as those we've outlined above, and getting to know the syntax for those commands.

However, you should be careful when using Terminal, it's a powerful tool that has deep access to your Mac's system files. Check commands by googling them if you're not sure what they do. And if you need to delete files to save space, use an app like CleanMyMac X to do it. It's much safer!

These might also interest you:





broken image