Config Files
/etc/profile
/etc/profile
contains Linux system wide environment and startup programs. It is used by all users with bash
, zsh
, sh
shell. Usually used to set PATH
variable, user limits, and other settings for user. It only runs for login shell. If you wanted to make large changes or application specific changes use /etc/profile.d
directory.
Add Program toPATH
export PATH=$PATH:/opt/sublime_text
~.bashrc
.zshrc
Execute commands at start of a shell instance for a given users only
Create a cmd alias
alias | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Add custom functions
function | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
etc/fstab
There's a file called /etc/fstab in your Linux system. Learn what its contents mean and how it's used in conjunction with the mount command. When you learn to understand the fstab file, you'll be able to edit its contents yourself, too.
- column - Device
UUID=...
/dev/hda2
- column - Default mount point
/
mnt/data
media/disk
- column - Filesystem type
ext2
ext4
ntfs
vfat
auto
- column - Mount options
auto and noauto
- mounted automatically at bootupuser and nouser
- allows normal user to mount the deviceexec and noexec
- lets execute binaries from that partitionro and rw
- R ead- O nly and R ead- W ritesync and async
- data can be writte synchron or asynchrondefault
- meansrw,suid,dev,exec,auto,nouser,async
- column - Dump options
- In most cases
0
- In most cases
- column - fck options
- In most cases
0
- In most cases
fstab | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|