Pages

Friday, June 2, 2017

10 Interesting Linux Command Line Tricks and Tips Worth Knowing

I passionately enjoy working with commands as they offer more control over a Linux system than GUIs (Graphical User Interfaces) applications, therefore am always on the look out to discover or figure out interesting ways and ideas to make Linux so easy and fun to operate, primarily from the terminal.
It is always thrilling when we discover new tricks or tips while using Linux especially a command line geek like myself.

And the feeling of wanting to share newly learned practices or commands with millions of Linux users out there, particularly the newbies who are still getting their way around this exciting operating system normally sets in.
In this article, we will review a number of useful command line tricks and tips that can significantly enhance your Linux usage skills.

1. Lock or Hide a File or Directory in Linux

The simplest way of locking a file or directory is by using Linux file permissions. In case your the owner of a file or directory, you can block (remove read, write and execute privileges) other users and groups from accessing it as follows:
$ chmod 700 tecmint.info
OR
$ chmod go-rwx tecmint.info
To know more about Linux file permissions, read this article Managing Users & Groups, File Permissions & Attributes in Linux.
To hide the file/directory from other system users, rename it with a (.) at the start of the file or directory:
$ mv filename .tecmint.info

2. Translate rwx Permissions into Octal Format in Linux

By default, when you run the ls command, it displays file permissions in rwx format, but to understand the equivalence of this format and the octal format, you can learn how to translate rwx permissions into Octal format in Linux.

3. How to Use ‘su’ When ‘sudo’ Fails

Although sudo command is used to execute commands with superuser privileges, there are moments when it fails to work as in the example below.


      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1n5YjR
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment