Select Page
How to check disk space on Unix servers

How to check disk space on Unix servers

I just lately switched from a Home windows server 2016 to a FreeBSD Unix server. I wish to take a look at disk house on Unix command line. How do I in finding out disk house usage data the usage of the Unix command-line possibility?

Unix circle of relatives of working techniques be offering the next instructions to test disk house utilization as consistent with your wishes.

Take a look at disk house on Unix working gadget

Unix command to test disk house:

  1. df command – Displays the quantity of disk house used and to be had on Unix report techniques.
  2. du command – Show disk utilization statistic for every listing on Unix server.

Methods to show Unix disk utilization statistics

See disk utilization for all information within the present listing. Run:
du -a
To get the disk utilization of a listing tree and every of its subtrees for /house/vivek, input:
du /house/vivek
Alternatively, it’s imaginable to peer outout 1024-byte blocks if you happen to go the -k transfer, input:
du -k /house/vivek
Wish to see overall disk utilization of a listing tree? Check out:
du -s /house/vivek

248088	/house/vivek

One can summarize disk utilization for a selected listing as follows:
du -hs /house

1.4G	/house

Subsequent allow us to display title and dimension of all py (Python) information in a selected listing. Additionally show grand overall on the finish:
du -ch /house/vivek/challenge/mgt1.2/*.py

Getting lend a hand about du command

Check out working the next guy command or see on-line guy web page here:
guy du
whatis du

Methods to show unfastened disk house data on Unix

To view the quantity of unfastened house within the report gadget, check out df command:
df
Check disk space on Unix using df command
Wish to display details about /jails/www/ report gadget in 1024-byte blocks layout, run:
df -k /jails/www/

Filesystem      1024-blocks    Used       Avail Capability  Fastened on
zroot/jails/www 10745194355 3152328 10742042027     0%    /jails/www

In a similar fashion, to turn details about /jails/www report gadget in MB blocks layout, input:
df -m /jails/www/

Filesystem      1M-blocks Used    Avail Capability  Fastened on
zroot/jails/www  10493353 3078 10490275     0%    /jails/www

How about GB blocks layout for /jails/www report gadget?, Check out:
df -g /jails/www/

Filesystem      1G-blocks Used Avail Capability  Fastened on
zroot/jails/www     10247    3 10244     0%    /jails/www

Show a grand overall

Go the -c possibility:
df -c
Some model of Unix working techniques can show output in human readable layout. In different phrases, Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte:
df -H
Pattern outputs:

Filesystem                                 Measurement    Used   Avail Capability  Fastened on
zroot/ROOT/default                          11T    4.2G     11T     0%    /
devfs                                      1.0k    1.0k      0B   100%    /dev
fdescfs                                    1.0k    1.0k      0B   100%    /dev/fd
zroot/iocage                                11T    148ok     11T     0%    /iocage
zroot/iocage/obtain                       11T    131ok     11T     0%    /iocage/obtain
zroot/iocage/obtain/11.2-RELEASE          11T    285M     11T     0%    /iocage/obtain/11.2-RELEASE
zroot/iocage/pictures                         11T    131ok     11T     0%    /iocage/pictures
zroot/iocage/jails                          11T    131ok     11T     0%    /iocage/jails
zroot/iocage/log                            11T    131ok     11T     0%    /iocage/log
zroot/iocage/releases                       11T    131ok     11T     0%    /iocage/releases
zroot/iocage/releases/11.2-RELEASE          11T    131ok     11T     0%    /iocage/releases/11.2-RELEASE
zroot/iocage/releases/11.2-RELEASE/root     11T    1.2G     11T     0%    /iocage/releases/11.2-RELEASE/root
zroot/iocage/templates                      11T    131ok     11T     0%    /iocage/templates
zroot/jails                                 11T    131ok     11T     0%    /jails
zroot/jails/fullbasejail                    11T    364M     11T     0%    /jails/fullbasejail
zroot/jails/rsnapshot                       11T    209G     11T     2%    /jails/rsnapshot
zroot/jails/www                             11T    3.2G     11T     0%    /jails/www
zroot/tmp                                   11T    131ok     11T     0%    /tmp
zroot/usr/house                              11T    220ok     11T     0%    /usr/house
zroot/usr/ports                             11T    1.0G     11T     0%    /usr/ports
zroot/usr/src                               11T    1.7G     11T     0%    /usr/src
zroot/var/audit                             11T    131ok     11T     0%    /var/audit
zroot/var/crash                             11T    131ok     11T     0%    /var/crash
zroot/var/log                               11T    4.2M     11T     0%    /var/log
zroot/var/mail                              11T    131ok     11T     0%    /var/mail
zroot/var/tmp                               11T    131ok     11T     0%    /var/tmp
zroot                                       11T    131ok     11T     0%    /zroot
devfs                                      1.0k    1.0k      0B   100%    /jails/rsnapshot/dev
devfs                                      1.0k    1.0k      0B   100%    /jails/www/dev

Filesystem Measurement Used Avail Capability Fastened on
zroot/ROOT/default 11T 4.2G 11T 0% /
devfs 1.0k 1.0k 0B 100% /dev
fdescfs 1.0k 1.0k 0B 100% /dev/fd
zroot/iocage 11T 148ok 11T 0% /iocage
zroot/iocage/obtain 11T 131ok 11T 0% /iocage/obtain
zroot/iocage/obtain/11.2-RELEASE 11T 285M 11T 0% /iocage/obtain/11.2-RELEASE
zroot/iocage/pictures 11T 131ok 11T 0% /iocage/pictures
zroot/iocage/jails 11T 131ok 11T 0% /iocage/jails
zroot/iocage/log 11T 131ok 11T 0% /iocage/log
zroot/iocage/releases 11T 131ok 11T 0% /iocage/releases
zroot/iocage/releases/11.2-RELEASE 11T 131ok 11T 0% /iocage/releases/11.2-RELEASE
zroot/iocage/releases/11.2-RELEASE/root 11T 1.2G 11T 0% /iocage/releases/11.2-RELEASE/root
zroot/iocage/templates 11T 131ok 11T 0% /iocage/templates
zroot/jails 11T 131ok 11T 0% /jails
zroot/jails/fullbasejail 11T 364M 11T 0% /jails/fullbasejail
zroot/jails/rsnapshot 11T 209G 11T 2% /jails/rsnapshot
zroot/jails/www 11T 3.2G 11T 0% /jails/www
zroot/tmp 11T 131ok 11T 0% /tmp
zroot/usr/house 11T 220ok 11T 0% /usr/house
zroot/usr/ports 11T 1.0G 11T 0% /usr/ports
zroot/usr/src 11T 1.7G 11T 0% /usr/src
zroot/var/audit 11T 131ok 11T 0% /var/audit
zroot/var/crash 11T 131ok 11T 0% /var/crash
zroot/var/log 11T 4.2M 11T 0% /var/log
zroot/var/mail 11T 131ok 11T 0% /var/mail
zroot/var/tmp 11T 131ok 11T 0% /var/tmp
zroot 11T 131ok 11T 0% /zroot
devfs 1.0k 1.0k 0B 100% /jails/rsnapshot/dev
devfs 1.0k 1.0k 0B 100% /jails/www/dev

See df command guy web page here or by means of typing the next command for more information:
guy df

Conclusion

You discovered find out how to see unfastened and used disk house in addition to disk utilization statistics on Unix techniques.

Change netplan renderer from networkd to NetworkManager

Change netplan renderer from networkd to NetworkManager

I prefer to use NetworkManager on my Ubuntu desktop, but currently, it is using networkd. As a result, I cannot set up or configure NetworkManager using GUI tools. Is there anyway to change netplan renderer from networkd to NetworkManager running on Ubuntu Linux? How can I change netplan renderer in Ubuntu Linux?

Ubuntu Linux changed the networking config, and it is done using YAML. Netplan is a utility for easily configuring networking on a Linux-based system. It supports both networkd and NetworkManager.

networkd is part of Systemd. In other word systemd-networkd used to manage network connections using Systemd. On the other hand NetworkManager is a GUI tool for configuring networking options.

You can tell Netplan to use NetworkManager and it is useful for Linux desktop or laptop users. By default all network devices get handled by systemd-networkd. Let us see how to change that on an Ubuntu Linux desktop.

Change netplan renderer from networkd to NetworkManager

The procedure is as follows:

  1. Open the Terminal window app
  2. Backup current config file using the cp command.
  3. Type the following command to edit your netplan config file
  4. Set renderer to NetworkManager
  5. Save and close the file
  6. Reboot the system

Let us see all commands in details.

How to change renderer from systemd-networkd NetworkManager

First view the config file using the cat command:
cat /etc/netplan/01-netcfg.yaml
Sample outputs:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s31f6:
      dhcp4: yes

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: yes

The above config tells of bringing up the Ethernet interface named enp0s31f6 via DHCP.

Network Manager as the backend for netplan

Network Manager strives for Network Connectivity, which “Just Works” for new Linux users. The machine should use the wired network connection when it’s plugged in but automatically switch to a wireless connection when the user unplugs it. Similarly, you can easily configure a VPN network and many other options. Edit the config file using a text editor such as nano command or vim command
sudo cp -v /etc/netplan/01-netcfg.yaml /root/
sudo vim /etc/netplan/01-netcfg.yaml

Update it as follows:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
# Set and change netplan renderer to NetworkManager GUI tool 
network:
  version: 2
  renderer: NetworkManager

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
# Set and change netplan renderer to NetworkManager GUI tool
network:
version: 2
renderer: NetworkManager

Save and close the file. You can reboot the Linux computer or apply change by typing the following command:
sudo netplan apply
The above command applies the current netplan configuration to a running system.

How do I use a GUI tool to configure networking?

Open the Activities (press the Super key on your keyboard) overview and start typing Settings.

Activities overview to start Setting in Ubuntu Linux
Make sure you click on Settings.

Next click on Network:
Activities overview to start Setting in Ubuntu Linux
Now you can edit or and set new IP address. Select IPv4 or IPv6. Type in the IP Address and Gateway, as well as the appropriate Netmask. In the DNS section, switch the Automatic switch to off. Enter the IP address of a DNS server you want to use and so on:
Ubuntu change netplan renderer from networkd to NetworkManager for networking

Conclusion

You just learned how to change netplan renderer and set it to GUI based Network Manager GUI tool. For more information, see this page here and here.