Predictive Hacks

System Info Commands in Unix

We will provide you with some useful commands in Unix where you can get information about your system.

  • date: It returns the current datetime.
date
Mon Oct 25 19:54:48 EEST 2021
  • uptime: It returns how much time your system is up.
uptime
19:57:02 up 2 days, 30 min,  0 users,  load average: 0.52, 0.58, 0.59
  • users: It returns all the users who are logged into the system.
  • who: It returns the users that are logged-in and gives us a listing for each one of those log-ins
  • whoami: It returns the username of the current user when this command is invoked
whoami
g_pipis
  • uname: It returns the name of the operating system.
uname
Linux

If you want more details, you can add the -a option.

uname -a
  • df: It returns the amount of the free space on the disk
df -h
  • du: It returns the size of a file or directory
du -h /path 

Or, if you want to see the size per file within the directory.

du -ha /path

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

Python

Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.

Python

Intro to Chatbots with HuggingFace

In this tutorial, we will show you how to use the Transformers library from HuggingFace to build chatbot pipelines. Let’s