du is a standard unix command to calculate disk space from Unix/Linux system.
To get the sum space of the directory,
To get sum space with human-readable,
To get sub directories space
du -sh *
To get sub directories space with all hidden folder,
du -sk .[!.]* * | sort -n
With Debian-based of the Linux system, you will need to use apt-get as the package handle utility to handle your Linux Distro packages.
The Basic of apt-get,
– Resynchronise installed packages with their sources. (Always do this before an upgrade.)
– Install the newest version of all packages installed on the system.
– Upgrade to the latest version of your distribution.
apt-get install package1 package2 package3
– Install programs package1, package2 and package3 along with all their dependencies.
apt-get remove package1 package2 package3
– Remove programs package1, package2 and package3.
apt-get purge package1 package2 package3
– Remove programs package1, package2 and package3 and delete any configuration files that they used.
– Update the package cache and check for any broken dependencies.
– Clean out retrieved package files.
– Clean out retrieved package files, but only those that are no longer needed.
– Remove any packages that were installed to satisfy dependencies but are no longer required.
For advance usage,
apt-get source package1
– Retrieve source files for package package1.
apt-get build-dep package1
– Get all the dependencies needed to build package package1.
apt-get source package1 -b
– Fetch the source code then compile it.
PuTTY is a tools that used by a Windows Operating User to connect to their Linux System remotely. With PuTTY connections, they could done whatever they needed without a GNOME interface or VLC.
Today, Mick Genie will show you some steps to master your PuTTY usage from your Windows Operating System.
With this session, you may need to download PuTTY from here. At the same time, you will need to understand Pageant as well in order to perform the SSH Key agent task from your PC, however it is optional if you have only 1 SSH Key.
First of all, launch your PuTTY from your PC and you shall prompted the basic login detail such as host name and port. Insert the hostname or IP of your Linux System and enter the port of 22 or you should use the alternative port if you have change them.Then, click Open.
You should receive the security alert for the first time login, but you may ignore it by press Yes button.
Auto-Load the SSH Key
For some reason, you might want to load the SSH Key automatically when your PC startup. You may add a shortcut to the startup folder of your PC and select the Target with extra command of “-load” and with your key path.
You might also want to have your username to be configured automatically as you might have the same username for all of your SSH session. Hence you might set the Auto-login Username from the Connection and Data field.
SSH Key for SSH session
This is the way to set the PuTTY to connect to the SSH key without using Pageant and you may just to call them from the Auth field.
From Unix/Linux system, you do not need to enter your login password for every login to your remote login.
You may create a RSA key to allow you to log into your remote server/box.
To create the RSA key, type the following command.
ssh-keygen -t rsa
Enter each of the question being asked.
Then log into the server that you would like to authenticate login and paste the code from /root/.ssh/id_rsa.pub to /root/.ssh/authorized_keys of the remote server.