List of my Linux basic problems.
1. Run $ ./configure // nothing happend
2. Run $ make to compile // no makefile found
3. Create build directory and move there $ mkdir build $$ cd build
4. Type from build directory $ cmake .. // compiled with some errores like CMAKE_CXX_COMPILER-NOTFOUND
5. G++ was not installed. I installed it $ sudo apt install g++
1. If your linux is old You have to change repositories etc/apt/sources.list
2. You have to change this file to new one with new links to repository.
1. Use DejaDup $ sudo apt install deja-dup –classic // But it is suit for some folders not for all system backup
2. $ sudo apt install timestart // There is no on lubuntu repository
3. Just copy all folder /var/cache/apt/archives/
4. then install them manualy $ sudo dpkg -i *.deb
1. To check if GUI is installed or not type $ ls /usr/bin/*session
2. Try to install with # dnf groupinstall "Server with GUI" -y
1. To check ubuntu version type:
$ lsb_release -a It is also saved in etc/issue
2. If you want to move at the root catalog in file manager just type:
CTRL+L you will see at the top highlighted path. Type just / then ENTER. / is the root catalog.
3. All programs are in catalog /bin
4. User’s programs are in /opt catalog
5. To make file writable use:
$ sudo chmod +rwx file.txt
6. tldr command is very usefull, It shows examples of usage:
$ tldr chmod or chmod 644 file.txt first number 6 is a owner right
7. If you unable to copy file in folder in Ubuntu
Check directory permission $ ls -l folder/
To grant permission $ sudo chmod -R 777 directory/
$ sudo -s enable root mode
1. $ route // Shows routing table
2. $ netstat // Shows connections
1. Use dig command
2. Use nslookup
1. Boot with SHIFT button to advanced menu → recovery mode. Some module is failed.
2. Drop to root shell prompt.
3. Previously I’ve changed repositories. So I turn it back. # nano /etc/apt/sources.lisf
4. Change focal back to bionic. # apt update && apt upgrade // got error Failed to restart udev.service
5. Boot with CD → rescue broken system // doesn’t help
6. Recovery mode → update GRUB // doesn’t help
7. Reinstall system
1.
1. Install browser chromium
sudo pacman -Syu
sudo pacman -S chromium
2. Install snap-store // $ sudo pacman -S snapd then use gui add-remove software
3. How to clean hard disk to get free space.
3.1` To check disc space $ df
3.2 Remove unwanted .pkg files from /var/cache/pacman/pkg/ or $ pacman -Scc
3.3 How to do pacman autoremove // pacman -Qdtq
3.4. Limit journal $ sudo journalctl --vacuum-size=50M
4. Manjaro doesn't starts. Restore manjaro fix boot errors.
4.2. Press ESC on start to enter GRUB.
4.2.1. Run test memory. // No
4.2.2. Type E to edit GRUB parameters. To load in safe mode without display manager add a 3 to the options at the end of the line (and optionally remove ‘quiet’) so it appears like this:
linux /boot/vmlinuz-4.11-x86_64 root=UUID=0a01099a-1e33-489a-a2de-10104e8492f5 rw 3 type F10 // Nothing
4.2.3. Boot from livecd and use manjaro-chroot -a and update everything # pacman -Syu
1. KALI doesn't boot up. I got
/dev/mapper/k--vg-root contains a file system with errors, check forced.
Inodes that were part of a corrupted orphan linked list found.
/dev/mapper/k--vg-root: EXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e. without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/mapper/k--vg-root requires a manual fsck
BusyBox v1.36.1 (Debian 1:1.36.1-3.1+b1) built in shell (ash)
(initrampfs)
1.1. Try to run $ fsck -y /dev/sda1 ; reboot -f to fix disk errors. If this problem will repeat in future again maybe your HDD going to broke. // I got fsck from util-linux thats all
1.2. My bad. I have not sda1 corrupted but /mapper/k--vg-root try $ fsck -y /dev/mapper/k--vg-root // HELPED
2. How to clear garbage and old archives. // sudo apt-get autoclean
2.1 How to clear garbage and old archives. // sudo apt-get autoremove
2.2 sudo apt clean
1. How to clean system space. // dnf system-upgrade clean
1.1. dnf clean packages
1.2. dnf autoremove
1.3. Delete old kernel // dnf remove $(dnf repoquery --installonly --latest-limit=-2 -q)