기본 콘텐츠로 건너뛰기

3월, 2020의 게시물 표시

Linux adding PATH environment variable

We add a new path to the PATH variable using the EXPORT command prerequisite : echo $PATH > a list of saved environment variable be printed... TO APPEND A NEW PATH, WE REASSIGN PATH WITH OUR NEW PATH AT THE END $export PATH=$PATH:/some/new/path source :  https://www.baeldung.com/linux/path-variable .....it kinda failed for my case making it able to run android studio running everywhere i am but i will just leave it like that atm..

Linux : How to copy files in terminal

cp : copy files and directories SYNOPSIS        cp [OPTION]... [-T] SOURCE DEST        cp [OPTION]... SOURCE... DIRECTORY        cp [OPTION]... -t DIRECTORY SOURCE... DESCRIPTION       Copy SOURCE to DEST, or multiple SOURCEs ro DIRECTORY error msg cp: -r not specified; omitting directory 'android-studio' -R, -r, --recursive      copy directories recursively

Linux : How to extract & install tar.gz Files in Ubuntu

1. Download the desired .tar.gz  file 2. Open terminal 3. $tar zxvf PACKAGENAME.tar.gz $tar xvjf PACKAGENAME.tar.bz2 4. navigate to the extracted folder using cd command $cd PACKAGENAME 5. Run the following command to install ./configure make sudo make install Q.tar zxvf A. man tar : an archiving utility -x : Extract files from an archive. Arguments are optional. when give, they specify names of the archive members to be extracted --extract -z : means unzip --gzip -v : means print the file name verbosely -verbose -f : means the following argument is a filename --file source : https://stackoverflow.com/questions/21929223/what-does-zxvf-mean-in-tar-zxvf-filename https://sourcedigit.com/20839-extract-install-tar-gz-files-ubuntu/ man tar

git : fatal: unable to auto-detect email address : HOW TO FIX

STEP1 git config --global -l --show-origin result warning: unable to access '/home/min/.gitconfig': Permission denied warning: unable to access '/home/min/.gitconfig': Permission denied fatal: unable to read config file '/home/min/.gitconfig': Permission denied PERMISSION FUCKING DENIED STEP2 ls -la /home/min this shows the list of directory /home/min ...but then I could finally see where da .gitconfig file is. -rwx--x--x   1 root root    98 Mar  9 17:10 .gitconfig oddly it was owned by user root and group root, let's fix it out and rest of files in /home/min, chown was 711 STEP3 chmod 755 /home/min sudo chown /home/min/.gitconfig min:min $shdo chown USERNAME:GROUPNAME FILENAME.EXTENSION chmod 644 /home/min/.gitconfig PERFECTO

git : configuration file not found...by my eyes

https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration?fbclid=IwAR0JOZWtTslqD8v-eA9n6pK6u9Gc9eXJMgKPZRskWZZcP3uOgNVlXz8xeUc git configuration file is supposed to be found at followed locations: 1. ~./gitconfig or ~.config/git/config 2. etc.gifconfig 3. .git/config

Linux : directory structure

/ - The Root Directory /bin - Essential User Binaries that must be present when the system is mounted in single-user mode.. sbin is similar /boot - static boot files /etc - Configuration files contains system-wide configuration files. unlikely, user-specific configuration files are located in each user's home directory /home - Home Folders contains a home folder for each user. for example /lib - Essential shared libraries contains libraries needed by the essential binaries in the /bin and /sbin folder. /root - Root home directory is the home directory of the root user. instead of being located at /home/root, its located at /root, this is distinct from /, which is the system root directory. /sbin - System Administration Binaries essential binaries that are generally intended to be run by the root user for system administration. $ dollar sign means that you are a normal user # hash means that you are the system administrator(root) ~ tilde means home d

git : fatal: unable to auto-detect email address

https://stackoverflow.com/questions/25671785/git-fatal-unable-to-auto-detect-email-address/34409245 make..sure you should be in your home directory not in local directory... i never thought that could be the factor... I should be sticking more around documentations. https://git-scm.com/docs/user-manual.html $ means user home directory still not fixed

python : strings enclosed by """

https://www.digitalocean.com/community/tutorials/how-to-format-text-in-python-3 Multiple lines With multiple lines, strings can be grouped into clean and orderly text, formatted as a letter, or used to maintain the linebreaks of a poem or song lyrics with triple quotes, you can print strings on multiple lines to make text, especially lengthy text, easier to read... """ This string is on multiple lines within three double quotes on either side. """

virtualenv : How to set up a virtual environment for python

step 0. be at the directory that you want to set up the env step1. make sure that you have virtualenv installed https://gist.github.com/frfahim/73c0fad6350332cef7a653bcd762f08d step2.  $virtualenv projectName =>this will set up up bin, include, and lib folder in current directory step2-1. $ virtualenv -p python3 . tag -p specifies the specific version of python step3. source projectName/bin/activate => this will activate the env step4. deactivate //to deactivate.... How to delete a virtual environment? $rm -rf projectName

pip [Errno 13] Permission denied:

it seems installing a python package to a system folder is not recommended I think that's how i broke my latest ubuntu linux lol I was doing a lot of random stuff installing python packages on system folder --user https://stackoverflow.com/questions/42988977/what-is-the-purpose-pip-install-user --user makes pip install packages in your home directory instead, which doesn't require any special privileges... resource: https://github.com/googlesamples/assistant-sdk-python/issues/236

port? port? PORT?!

In computer networking, a port is a COMMUNICATION ENDPOINT. At the software level, within an operating system, a port is A LOGICAL CONSTRUCT that identifies a specific process or a type of network service. Ports are identified for each protocol and address combination by 16-bit unsigned numbers, commonly known as the port number. https://en.wikipedia.org/wiki/Port_(computer_networking)