There are many useful Linux commands that are very useful when navigating your new Linux system. Checking disk space or deleting files is very easily done with the command line.
To get a basic introduction to the Linux command line, use the man intro
command.
This gives a basic rundown of how the shell works and how to get started with the BASH shell in the terminal.
For example. Deleting a file on the command line.
jason@jason-Lenovo-H50-55:~/Documents$ rm test |
This example will delete the file named “test”.
To install all pending updates on a Debian based Linux system, use this command.
jason@jason-Lenovo-H50-55:~/Documents$ sudo apt update; sudo apt upgrade |
This will update the package repository information and then install all pending updates.
To check available disk space on your Linux system, use this command.
jason@jason-Lenovo-H50-55:~$ df -Hla / Filesystem Size Used Avail Use% Mounted on /dev/sda1 984G 70G 864G 8% / |
This shows the remaining disk space and the size of the Linux partition.
To identify a certain file, use the file command, this will tell you what file type it is.
jason@jason-Lenovo-H50-55:~/Documents$ file ballreaction.webm ballreaction.webm: WebM |
Further reading for users of Debian.
https://www.securitronlinux.com/lc/debian-handbook.pdf.
When you need more information on a certain Linux command, use this simple one-liner.
jason@jason-Lenovo-H50-55:~/Documents$ info ls | less |
This will print a lot of useful information about the “ls” command. This is very helpful for new users of Linux.