Category: Docker

Run .sh File Commands All in Once in Linux

This article covers how to run sh files using the terminal as well as using the command line or terminal. In fact, the .sh file is nothing but the shell script to install given application or to perform other tasks under Linux like operating systems.

How do I run .sh file shell script in Linux?

The procedure to run the .sh file shell script on Linux is as follows:

  • Open the Terminal application on Linux or Unix.
  • Create a new script file with .sh extension using a text editor.
  • Write the script file using nano script-name-here.sh.
  • Set execute permission on your script using chmod command : chmod +x script-name-here.sh .
  • To run your script : ./script-name-here.sh
  • Another option is as follows to execute shell script: $ sh script-name-here.sh OR bash script-name-here.sh .

mktemp Command in Linux - Explained with examples ?

This article covers how to use the mktemp command in Linux. In fact, mktemp can help to Create temporary files or directoriesin your Linux system.

Convert a Directory to a Partition in Linux

This article covers moving the home directory into a newly added disk that has a dedicated Partition.

Different methods of Checking MySQL Version in Linux

This article covers the ways to check the MySQL version in Linux. In fact, MySQL (and its drop-in replacement MariaDB) is the most popular open-source relational database management system. There are some important differences between MySQL versions, so knowing which version is running on your server might be important in some situations.

How to Check MySQL Version with V Command ?

The easiest way to find the MySQL version is with the command:

$ mysql -V

The command mysql –V is not OS specific. This command works on Windows, OS X, and Linux distributions including Ubuntu.

Different methods to Open a File in Linux

This article covers the different methods to open a file in Linux via a terminal. In fact, In Linux, we can display various file formats such as text file, audio files, video, image, doc, pdf, or any other file contents.

How to Open File Using gnome-open Command ?

For the GNOME-based Linux environment, we can use the gnome-open command to open a file.

If the gnome utility is not installed on our machine, we can install it by using the following command:

$ sudo apt install libgnome2-bin  

Execute the above command and provide the system administrator password to install the GNOME utility.

Now, to display the file content, execute the command as follows:

$ gnome-open Test.txt  

The above command will open the file with the default file system.

There are some other popular Linux environments, such as KDE DESKTOP, OS X UNIX, and more.

For KDE Desktop, execute the command as follows:

$ kde-open <file name>  


$ xdg-open <file name>  

For OS X UNIX, execute the command as follows:

$ open <file name> 

Most Effective GUI Tools to Free Up Space on Ubuntu and Linux Mint

This article covers the best GUI Tools to Free Up Space on Ubuntu and Linux Mint . In fact, you can use these tools to regularly keep your Ubuntu / Linux Mint system free of junk files.

How to Remove old kernels from the Ubuntu / Linux Mint system  ?

1. As we should know, the Linux Kernel is the heart of the system, but it is also known that it is updated every so often, so they are released new versions which are installed in the system displacing the old versions which remain stored without being eliminated.

For this we must type the following command:

$ sudo dpkg 'linux-image *' --list

2. Next, they must identify their oldest kernels and execute the following command to remove the previous versions.

Just replace xxxxx with the version of Linux you want to delete:

$ sudo apt-get remove linux-image-xxxxx

3. As an alternative, an easier way to clean up these old kernels is to use 'autoremove':

$ sudo apt-get autoremove  --purge