Bitbucket git settings
- ssh key settings
cd ~/.ssh
ssh-keygen -t rsa -C your-email
- create bitbucket config file
vim ~/.ssh/config
# vim mode
Host bitbucket.org
HostName bitbucket.org
IdentityFile ~/.ssh/id_rsa
- Add ssh key to bitbucket account
1. Copy content ~/.ssh/id_rsa.pub
2. bitbucket account settings > Access keys > Add key > Label: desired name / Key: copy content > add key
- Go to specific directory and clone your remote project
Asia/Seoul Timezone Settings
- Restart your ubuntu
Configure crontab
login account path global variable: $HOME
code in "crontab -l"
0 5 * * * . $HOME/.profile; /path/shell/script
Crontab is not an interactive shell. Therefore, you must command "$HOME/.profile" in "crontab -e"
The ".bashrc" file does not apply.
.bashrc vs .bash_profile
.bash_profile and .bashrc are specific to bash, whereas .profile is read by many shells in the absence of their own shell-specific config files. (.profile was used by the original Bourne shell.) .bash_profile or .profile is read by login shells, along with .bashrc; subshells read only .bashrc. (Between job control and modern windowing systems, .bashrc by itself doesn't get used much. If you use screen or tmux, screens/windows usually run subshells instead of login shells.)
The idea behind this was that one-time setup was done by .profile (or shell-specific version thereof), and per-shell stuff by .bashrc. For example, you generally only want to load environment variables once per session instead of getting them whacked any time you launch a subshell within a session, whereas you always want your aliases (which aren't propagated automatically like environment variables are).
Other notable shell config files:
/etc/bash_profile (fallback /etc/profile) is read before the user's .profile for system-wide configuration, and likewise /etc/bashrc in subshells (no fallback for this one). Many systems including Ubuntu also use an /etc/profile.d directory containing shell scriptlets, which are . (source)-ed from /etc/profile; the fragments here are per-shell, with *.sh applying to all Bourne/POSIX compatible shells and other extensions applying to that particular shell.
What is interactive shell?
An interactive shell is simply any shell process that you use to type commands, and get back output from those commands. That is, a shell with which you interact.
So, your login shell is interactive, as are any other shells you start manually, as described in the excerpt you quoted in your question. By contrast, when you run a shell script, a non-interactive shell is started that runs the commands in the script, and then exits when the script finishes.
The Bourne shell can be used as an interactive shell, just like bash or tcsh. In fact, many systems, such as FreeBSD, use sh as the default user shell. Modern shells like bash, zsh, tcsh, etc have many features that Bourne shell doesn't have, that make them more comfortable and convenient for interactive use (command history, completion, etc).
Interactive non-login shells (that is, shells you start manually from another shell or by opening a terminal window) don't read your .login or .profile files. These are only read and executed by login shells (shells started by the login system process, or by your X display manager), so the commands and settings they contain are only applied once, at the beginning of your login session. So, when you start a terminal, the shell that it spawns for you does not read your login files (.login for c-style shells, .profile for bourne style shells), but it does read the .cshrc, .bashrc etc files.
Run shell script corresponding to run levels
There are rc[0-6 or S].d directories in /etc. Each directory has files corresponding to the run levels of the Linux.
- Linux Standard Base specification run level information
ID | Name | Description |
0 | Halt | Shuts down the system. |
1 | Single-user mode | Mode for administrative tasks. |
2 | Multi-user mode | Does not configure network interfaces and does not export networks services. |
3 | Multi-user mode with networking | Starts the system normally. |
4 | Not used/user-definable | For special purposes. |
5 | Start the system normally with appropriate display manager (with GUI) | Same as runlevel 3 + display manager |
6 | Reboot | Reboots the system. |
Reference Urls
Bitbucket git settings
https://novemberde.github.io/2017/04/18/Bitbucket_access_key_0.html
Configure crontab
https://unix.stackexchange.com/questions/43385/what-do-you-mean-by-interactive-shell
Run shell script corresponding to run levels
'[개발] Infrastructure > Linux' 카테고리의 다른 글
[Linux] 디렉터리에 특정 단어를 포함하는 파일 찾기 (0) | 2021.08.17 |
---|---|
[Linux] 로그 파일의 내용을 truncate 명령어로 삭제하기. (0) | 2021.08.03 |
Apache httpd를 사용하여 Multiple VirtualHost 다루기 (0) | 2021.08.02 |
로컬에서 리눅스에 파일을 업/다운로드 할 수 있는 scp 명령어에 대해 알아보자 (0) | 2021.07.09 |
Ubuntu 메모리 사용량 줄이기 - 캐시 메모리 클리어 (0) | 2021.05.30 |