Skip to main content
added 4 characters in body
Source Link
Romeo Ninov
  • 19.5k
  • 5
  • 35
  • 48

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behaviour. The command is something like below, but don't do it, as it is a security riskbut don't do it, as it is a security risk.

export PATH=$PATH:.

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behaviour. The command is something like below, but don't do it, as it is a security risk.

export PATH=$PATH:.

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behaviour. The command is something like below, but don't do it, as it is a security risk.

export PATH=$PATH:.

hide bad practice
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behaviorbehaviour. The command is something like: below, but don't do it, as it is a security risk.

export PATH=$PATH:. 

export PATH=$PATH:.

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behavior. The command is something like:

export PATH=$PATH:. 

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behaviour. The command is something like below, but don't do it, as it is a security risk.

export PATH=$PATH:.

Source Link
Romeo Ninov
  • 19.5k
  • 5
  • 35
  • 48

This is architecture decision in UNIX and Linux. The main reason is security. You do not want to execute random file just because you are in the directory where the file is located. And this give you more precise control where are the trusted sources of executable files.

Of course you can add current directory in the path and have MS Windows like behavior. The command is something like:

export PATH=$PATH:.