Ubuntu : Some Tricks Together That May Help

There are a few tricks together for Ubuntu users that may help someone.

I always forget these simple commands whenever I need. That is why I simply combine them to get together.

To get the information of bits of your operating system using commands line

ubuntu@ubuntu:~$ uname -m

//Output would be x86_64

To permit a project all permission

Suppose you want to provide a permission to a directory full control to others, you just follow the below command:

ubuntu@ubuntu:~$ sudo chmod -R 777 /path-of-the-project/ or /path-of-a-specific-directory

How to make a directory writable

Directory means a folder to a location. By default it won't have an access of putting something in the folder/directory. To make the folder/directory writable you should do this:

ubuntu@ubuntu:~$ sudo chown -R username:www-data /path-of-your-directory/

For example, if your username is robot the command would be like

ubuntu@ubuntu:~$ sudo chown -R robot:www-data /path-of-your-directory/

To install .sh file on Ubuntu

To install .sh files on ubuntu you simply follow the below steps:

Crtl+T which will open your terminal, and write the below command to provide permission of that file first.

ubuntu@ubuntu:~$ sudo chmod 755 /path-of-your-sh-file-to-be-installed

after providing permission simply run the file like so, suppose your filename is FileToBeInstalled.sh

ubuntu@ubuntu:~$ sudo /path-of-directory/FileToBeInstalled.sh


Nice article


Have you say: