This is dangerous and not recommended though since a root user in Linux or Unix has extreme level of privileges. In fact almost most of the work can be done on the mac with a normal sign in, that is a normal administrator login for a single user on macOS.
sudo su -
Enter the password and you’re good to go ! Be careful with what you’d be doing as this may not be reversible.
this is the most destructable command in Unix as well as Linux
rm -rf / or mkfs.ext3 /dev/hda
To shut down your Mac immediately:
sudo shutdown -h now
To restart your Mac immediately:
sudo shutdown -r now
The “now” represents just now, if you want to give delay then you may enter numeric value say +10 at the end, that is after 10 minutes the computer would shut down.
We can even add a time delay (in minutes) if we wished too, this example below is for restarting the machine after 30 minutes
sudo shutdown -r +30
To prevent mac from sleeping, we can use the below give tool called caffeinate. Its like if you want to keep your machine up and running when you wish to download a huge file over the internet or keep mac on while you’re sleeping
caffeinate
Entering the command on its own will keep the Mac awake until you stop it by pressing Ctrl-C. You can add a time parameter with:
caffeinate -u -t 300
The number represents the number of seconds, so our command above will stop the Mac from going to sleep in the next 5 minutes
Now this one is cool, as you can give preferences while searching or creating a file which could be say 1Gb just for an example
mkfile 1gb hello.xyz
note:- the above file doesen’t need to have a file extension, You can specify the file size in bytes (b), kilobytes (k), megabytes (m) or gigabytes (g).
uptime
uptime is to display, the exact amount of time the machine or a server has been running.
top
top is a very popular command used by system administrators to monitor the system input and output status
history
history command shows last 500 entries done on the terminal
Also during any process if you get suck up, then you can always hit Ctrl + Z keys !
That’s it for now, stay tuned for more Linux and Unix tweaks and hacks.
This is not an ad-vocation by any means for TP-link branding, however a real life…
First of all we need to hit the kernel version on any Android device. You…
Use resolvectl status instead. It's like something deprecates and suddenly things get broken! In systemd…
Geeky question: This is what people and friends have tried: rsync -arv --exclude "/home/john/.ccache:/home/ben/build" /home/john…
You might encounter this error which appears to be very common on Debian based Distro's…
PS: This article is for only Kali Linux users, that too having a Broadcom Wireless…
View Comments
Thanks a ton Ivon, stay tuned for more. You may download the Android app as well !