2

I just compiled ffmpeg, now I just want to add it on the path.

Every source I can find reference .profile, and if not present or in specific cases, tell to use .pam_environment.

But double tab give me:

user@domain:~$ echo $HOME
/home/user
user@domain:~$ cd /home/empreinte/
user@domain:~$ nano .
./             .cache/        .local/        .npm/
../            .config/       .nano_history  .ssh/
.bash_history  .dbshell       .node-gyp/

Am I missing something? Can I just create the file?

EDIT:

user@domain:~$ ls -a $HOME
.              .cache    drywall  .nano_history  npm-debug.log  test   x264
..             .config   ffmpeg   .node-gyp      .ssh           tmp    yasm
.bash_history  .dbshell  .local   .npm           sysplay        video
DrakaSAN
  • 135
  • 7

3 Answers3

2

Refer to Ubuntu Enviroinment Variables, you could use also ~/.pam_environment, as you suggested.

So, create file if not exists, or edit if exists, and insert this line:

PATH DEFAULT=${PATH}:${HOME}/path/to/ffmpeg/bin
girardengo
  • 4,965
  • 1
  • 26
  • 31
1

A backup of .profile file would be present inside /etc/skel directory. Try to copy the same file to your HOME directory.

cp /etc/skel/.profile ~/

How i know this information?

$ locate .profile
/etc/skel/.profile
/home/avinash/.profile
Avinash Raj
  • 78,556
0

There is no reason to copy the default if you don't want to. You can simply create a new, empty .profile and add this line there:

export PATH=$PATH:/home/empreinte/

Avinash's approach is also correct of course, the files in /etc/skel are the defaults and you can copy the template file from there. It is just unnecessary since you can create it yourself.

In any case, I would recommend you create a new folder where you want to keep your own binaries and add that to the $PATH instead of keeping ffmpeg in your $HOME:

mkdir ~/bin
mv ~/ffmpeg ~/bin

Then, edit your ~/.profile and use this line instead of the above:

export PATH=$PATH:/home/empreinte/bin
terdon
  • 100,812