- Commands - This article will help you to get familiarized with all the most common Linux commands and their usages. These commands are divided into 15 sections based on their functionalities. Below some examples.
List/Find Proccess
sudo ps -ef
ps
- displays processes for the current shell. -e
- display every active process on a Linux. -f
- to perform a full-format listing.
sudo lsof -t -i:8000
lsof
- list of files(also used for to list related processes). -t
- show only process ID. -i
- show only internet connections related process (port in our case).
Killing Process
# Kill a process by PID
sudo kill <SIG> <PID>
# Kill a process by name
sudo killall <name>
Possible signals(SIG) for killing. SIGHUP 1 SIGINT 2 SIGKILL 9, etc.
Change Mode, Access
For the directories only. For the most cases.
find <folder> -type d -exec sudo chmod 755 {} \;
Only if you understand, what you are doing.
sudo chmod 755 -R <folder>
Change User Mode
sudo chown
sudo chown -R $USER ./out
Move(Mv) Command
Mv command main options.mv -f
force move by overwriting destination file without prompt. mv -i
interactive prompt before overwrite. mv -u
update - move when source is newer than destination. mv -v
verbose - print source and destination files
Move main.c def.h files to /home/usr/rapid/ directory
mv main.c def.h /home/usr/rapid/
Move all C files in current directory to subdirectory bak
mv *.c bak
Move all files in subdirectory bak to current directory
mv bak/* .
Rename file main.c to main.bak
mv main.c main.bak
Rename directory bak to bak2:
mv bak bak2
Inotify Watches Limit. IntelliJ
Inotify requires a "watch handle" to be set for each directory in the project. Unfortunately, the default limit of watch handles may not be enough for reasonably sized projects, and reaching the limit will force IntelliJ platform to fall back to recursive scans of directory trees.
wget -O /etc/sysctl.d/60-jetbrains.conf "https://gist.githubusercontent.com/bittner/c7d1d49fe0c9af907f24/raw/e2448528477ca3508ad480bea52d3dad54a58f10/60-jetbrains.conf"
sudo sysctl --system
IntelliJ. Memmory setting.
idea.vmoptions
and idea64.vmoptions
-Xms748m
-Xmx748m
idea.properties
idea.max.intellisense.filesize=999999
idea.max.content.load.filesize=999999
Apt Autoclean and Clean.
sudo apt-get update; sudo apt-get autoremove; sudo apt-get autoclean; sudo apt-get clean;
- Startup Disk Creator - Creating a bootable Ubuntu USB stick is very simple, especially from Ubuntu itself, and we're going to cover the process in the next few steps.
Skype, Slack
wget https://repo.skype.com/latest/skypeforlinux-64.deb; sudo dpkg -i skypeforlinux-64.deb; sudo apt-get update; sudo snap install slack --classic;
Firefox, Chrome
sudo apt-get update; sudo apt install firefox; sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; sudo dpkg -i google-chrome-stable_current_amd64.deb;
Sublime Text3
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -; sudo apt-add-repository "deb https://download.sublimetext.com/ apt/stable/"; sudo apt-get update; sudo apt-get install sublime-text;
Java Default, Java 8, Update Alternatives
sudo apt-get update; sudo apt install default-jre; sudo apt install default-jdk; sudo apt install openjdk-8-jdk; sudo update-alternatives --config java; sudo update-alternatives --config javac; sudo update-alternatives --config javadoc; sudo update-alternatives --config javap;
Git, Global config
sudo apt update; sudo apt install git; git config --global user.name "GensaGames"; git config --global user.email "GensaGames@domain.com";
Py, Py Dependencies and PIP
sudo apt-get update; sudo apt-get install python3.6; sudo apt-get install python3-distutils; sudo apt install python3-testresources; wget https://bootstrap.pypa.io/get-pip.py; sudo python3 get-pip.py;
Minimal Py and PIP
sudo apt update; sudo apt install python-minimal; wget https://bootstrap.pypa.io/get-pip.py; sudo python get-pip.py;
Tweak
sudo apt-get install gnome-tweak-tool;
Context Option, Empty Document
touch ~/Templates/Empty\ Document
Intellij Idea (Community)