If you have ever wanted to view how big your hard drive/partition sizes are in Linux, but only have access to the command line interface, here is the command to do it:
df
df -H (This will show the partition sizes in MB, GB, TB, etc.)
fdisk -l | grep Disk (This will show the physical disks and their corresponding sizes)
Tag Archives: Linux
Setting Static IP in Linux
To setup a static IP in ubuntu, edit your networking settings file.
Here is an example of how to do it:
Open /etc/network/interfaces:
Use these configurations:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
DHCP Address Configuration:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
Then restart the service: /etc/init.d/networking restart (Make sure you are running with admin privileges when restarting 🙂 )
Errors From Package Manager in Ubuntu 11.10
Getting the following message from Package Manager in Ubuntu 11.10?
Requires installation of untrusted packages
The action would require the installation of packages from not authenticated sources.
And when you click on the Details dropdown it shows all of the packages that need to downloaded?
Run the following commands:
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update
These commands will save a backup of the old lists and then create a new lists folder.
More information can be found here.