====== Ubuntu ====== ------------------------------------------------------------------------------------------------------------------------------------------------\\ ====== fsck root when ubuntu will not boot ====== 2023-12-10 hold space bar to get to Grub menu select recovery fsck /dev/mount/ubuntu--vs-root Note: do not use -p ====== fsck the file system ====== 2023-12-10 In older versions of Ubuntu, fsck used to work from the Recovery Mode. However, later versions of Ubuntu leave the primary HDD/SSD mounted, so fsck no longer works. Let's check/repair your filesystem... boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode open a terminal window by pressing Ctrl+Alt+T type sudo fdisk -l identify the /dev/sdXX device name for your "Linux Filesystem" type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier repeat the fsck command if there were errors type reboot https://askubuntu.com/questions/1359037/how-to-run-fsck-on-the-root-partion-from-the-grub-menu ====== xRDP for remote access to Ubuntu ====== 2023-12-08 Step 1 — Installing a Desktop Environment on Ubuntu In this step, you will install and configure a desktop environment on your Ubuntu server. By default, an Ubuntu server comes with a terminal environment only. A desktop environment will need to be installed to access a user interface. https://www.digitalocean.com/community/tutorials/how-to-enable-remote-desktop-protocol-using-xrdp-on-ubuntu-22-04 2020-07-27 JUL 2014 2019 How to use xRDP for remote access to Ubuntu 14.04 • Linux 310 To remotely control my Windows machines, I always prefer to use RDP (Remote Desktop Protocol) as it performs much nicer than VNC (Virtual Network Computing). VNC has this streak of “JPEG” quality and slow behavior, whereas RDP is fast and crystal clear. RDP is however a proprietary protocol from Microsoft. So how can we use RDP to control our Ubuntu box remotely? This is where xRDP comes in play, an open source remote desktop protocol (RDP) server. It actually runs VNC protocol over RDP as far as I understand, yet if behaves much better than VNC by itself (possibly because of the used desktop manager). Since Ubuntu 12.10 (if I’m not mistaken), xRDP doesn’t seem to work with the Ubuntu desktop anymore … unless you use an alternative desktop manager. This seems related to 3D acceleration and nobody seems to care (since 2011, according to bug reports). Note : if you really need Copy/Paste functionality between the two machines, then please use Ubuntu’s default installed “Desktop Sharing” instead (MacOS X users read this forum post). From < https://www.tweaking4all.com/software/linux-software/use-xrdp-remote-access-ubuntu-14-04/> ====== Software Source Listing ====== 2020-07-23 /etc/apt/sources.list.d /etc/apt/sources.list ====== Youtube is not working ====== From: http://askubuntu.com/questions/331769/youtube-is-not-working You have to install ubuntu-restricted-extras, not just download them (except if with the "i have downloaded the ubuntu restricted extras" you meant that you installed too). From terminal (CTRL+ALT+T) run sudo apt-get install -y ubuntu-restricted-extras stay there until installation completes, when it asks you for the MS fonts EULA, hit ENTER(key) to confirm. – NikTh Aug 12 '13 at 19:00 From: http://ubuntuforums.org/showthread.php?t=2176815 Basically, since Firefox 24 you no longer need flash in Linux to watch Youtube. However, not many people have realised that yet. There has been very little publicity about this major positive change. From: http://www.ghacks.net/2013/06/23/firefox-24-for-linux-gets-native-mp3-aac-and-h-264-support/ ====== ss - Socket command ====== 2020-11-10 USAGE EXAMPLES ss -t -a Display all TCP sockets. ss -t -a -Z Display all TCP sockets with process SELinux security contexts. ss -u -a Display all UDP sockets. ss -o state established '( dport = :ssh or sport = :ssh )' Display all established ssh connections. ss -x src /tmp/.X11-unix/* Find all local processes connected to X server. ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 193.233.7/24 List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers. ss -a -A 'all,!tcp' List sockets in all states from all socket tables but TCP. From: https://manpages.ubuntu.com/manpages/focal/man8/ss.8.html#usage%20examples ====== Ubuntu Server Guide ====== From: https://help.ubuntu.com/14.04/serverguide/serverguide.pdf Here you can find information on how to install and configure various server applications. It is a step-by-step, task-oriented guide for configuring and customizing your system ====== Tilix is an advanced GTK3 tiling ====== From: https://gnunn1.github.io/tilix-web/ Terminals can be re-arranged using drag and drop both within and between windows. ====== Tilda – The Yakuake terminal equivalent for Gnome ====== From: http://www.opensourcetutor.com/2007/06/11/tilda-the-yakuake-terminal-equivalent-for-gnome/ I have previously written about Tilda, a gnome replacement for Yakuake. I had some issues with Tilda so I came to have a nice relationship with Yakauke. It’s important to note though, that there is another reasonable alternative to both Tilda and Yakuake and it’s called Guake. ====== window manager and terminal multiplexer ====== ==== yakuake ==== From: https://www.kde.org/applications/system/yakuake/ Also: http://www.opensourcetutor.com/2007/06/11/tilda-the-yakuake-terminal-equivalent-for-gnome/ Also: https://www.slant.co/versus/2442/2449/~gnome-terminal_vs_yakuake Yakuake is a drop-down terminal emulator based on KDE Konsole technology. I haven’t tried Guake in approx. 2 years but back then it couldn’t do certain things that Yakuake can do easily. Yakuake can expand / shrink the terminal by 10% increments using alt+shift+ left / right / up / down. Full screen Ctrl + shift + F11. Move a terminal left/right = Ctrl + Shift + left/right. Split a terminal horizontally / vertically. Apart from being a Gnome app, what makes Guake better than Yakuake from your perspective? Shift+Up arrow = new tab vs Ctrl+shift+T in Tilda Shift+Down arrow = close tab vs Right-click -> Close tab Shift+Left arrow = Scroll to the next tab to the left vs no equivalent in Tilda Shift+Right arrow = Scroll to the next tab to the right vs no equivalent in Tilda Ctrl+Shift+W – Close Window Ctrl+Shift+Page Up – Go to the next tab to the right Ctrl+Shift+Page Down – Go to the next tab to the left. ==== Pimp up your Terminal with Guake and Yakuake ==== From: https://www.dedoimedo.com/computers/guake-yakuake.html Working with the command line, especially on modern desktops, usually requires using the mouse cursor to locate the terminal icon shortcut or find it buried in one of the menus, losing focus and wasting time. Guake and Yakuake, following the Quake-like behavior, are smarter. You can have the terminal without moving your "crosshairs off the target." Just like the gamers can't afford to move their mouse about looking for a menu. ====== software updater failing with the message "failed to download repository information". ====== From: https://askubuntu.com/questions/859599/ubuntu-16-04-software-updater-fails-with-failed-to-download-repository-informat Recently I've run into problems with software updater failing with the message "failed to download repository information". Go to the System Settings and open the Software and Updates then go to the Authentication tab. You should see some keys in there like the ones in this screenshot, if not hit the "Reset Defaults" button: ====== Stellarium ====== LIBGL_ALWAYS_SOFTWARE=1 stellarium LibGL environment variables LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering ====== RestrictedFormats/Flash ====== From: https://help.ubuntu.com/community/RestrictedFormats/Flash Ubuntu cannot include Flash automatically. Nevertheless, it is easy to easy to install Flash Player by yourself through the Ubuntu Software Center. You could also try one of several free alternatives. ====== Ubuntu Default Software ====== From: http://ninite.com/linux/lifehacker12 From: http://www.omgubuntu.co.uk/2013/04/must-have-apps-for-a-new-ubuntu-install From: http://www.omgubuntu.co.uk/2012/12/top-10-ubuntu-apps-of-2012 From: http://developer.ubuntu.com/2013/04/top-10-ubuntu-app-downloads-for-march/ From: http://www.unixmen.com/top-things-installing-ubuntu-13-10/ ====== History of Commands for reload Script ====== 1 sudo apt-get update && sudo apt-get install gnome-shell ubuntu-gnome-desktop 2 gnome-tweak-tool 4 gksu nautilus 5 sudo a2enmod rewrite 6 systemctl restart apache2 8 mysql -u root -p 9 composer create-project drupal-composer/drupal-project:8.x-dev /var/www/html/ --stability dev --no-interaction 11 sudo mv /var/www/html/* /home/a/Downloads 12 composer create-project drupal-composer/drupal-project:8.x-dev /var/www/html/ --stability dev --no-interaction 13 sudo composer create-project drupal-composer/drupal-project:8.x-dev /var/www/html/ --stability dev --no-interaction 15 sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/php.conf 17 sudo a2ensite php 18 sudo systemctl reload apache2 19 sudo chown -R www-data:www-data /var/www/html/web 20 cd /var/www/html 22 mkdir config 23 sudo mkdir config 24 sudo chown -R www-data:www-data config 25 mysql -u root -p 26 mysql -u linuxdb -p 39 sudo apt-get install wordpress 40 sudo apt-get update 41 wget -c https://wordpress.org/latest.tar.gz 42 sudo rsync -av wordpress/* /var/www/html 43 tar -xzvf latest.tar.gz 44 sudo rsync -av wordpress/* /var/www/html 45 sudo chown -R www-data:www-data /var/www/html 46 sudo chmod -R 755 /var/www/html 48 sudo mysql -u root -p 50 sudo mv wp-config-sample.php wp-config.php 53 cd /var/www/html 54 sudo mv wp-config-sample.php wp-config.php 55 sudo nano /var/www/html/wp-config.php 56 sudo systemctl restart apache2.service 57 sudo systemctl restart mysql.service 58 sudo mysql -u root -p 59 sudo nano /etc/apache2/apache2.conf 61 sudo nano /etc/apache2/ports.conf 62 sudo netstat -a 63 sudo netstat -plnt 67 sudo apt-get install vsftpd 68 sudo nano /etc/vsftpd.conf 69 sudo service vsftpd restart 73 /usr/sbin/nologin 74 sudo nano /etc/shells 75 sudo nano /etc/vsftpd.conf 76 sudo nano /etc/php7/apache2/php.ini 77 sudo nano /etc/php7.0/apache2/php.ini 78 sudo nano /var/www/html/info.php 79 sudo nano /etc/php/7.0/apache2/php.ini 80 sudo service apache2 restart 81 nano vsftpd.conf 82 nano /etc/vsftpd/vsftpd.conf 83 nano /etc/vsftpd.conf 84 sudo nano /etc/vsftpd.conf 85 sudo service vsftpd restart 86 sudo nano /etc/ssh/sshd_config 87 sudo nano /var/log/nginx 88 iptables -L 89 sudo iptables -L 90 state NEW tcp dpt:1131 91 sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 1131 -j ACCEPT 92 sudo /etc/init.d/iptables 93 sudo nano /etc/init.d/iptables 94 sudo nano /etc/sysconfig/iptables 95 sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 1131 -j ACCEPT 96 sudo iptables -A INPUT -p tcp --dport 1131 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 97 sudo ufw status 98 sudo iptables -L 99 sudo iptables -A INPUT -p http --dport 1131 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 100 sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 101 sudo iptables -L 102 sudo iptables -A OUTPUT -p tcp --sport 1131 -m conntrack --ctstate ESTABLISHED -j ACCEPT. 103 sudo ls /etc/wordpress 104 sudo ln -s /etc/wordpress/config-localhost.php /etc/wordpress/config-default.php 107 mysql -u root -p 108 mysql -u linuxdb -p 109 history | grep sys 110 systemctl restart mysql 112 mysql -u root -p 117 sudo nano /etc/apache2/apache2.conf 118 systemctl restart apache2 120 sudo chmod a+w /var/www/html/web/sites/default/settings.php 121 sudo nano /var/www/html/web/sites/default/settings.php 122 sudo chmod a-w /var/www/html/web/sites/default/settings.php 123 systemctl restart apache2 124 sudo chmod a+w /var/www/html/web/sites/default/settings.php 125 sudo nano /var/www/html/web/sites/default/settings.php 126 sudo chmod a-w /var/www/html/web/sites/default/settings.php 127 sudo chmod a+w /var/www/html/web/sites/default/settings.php 128 sudo chmod go-w /var/www/html/web/sites/default/settings.php 129 sudo chmod go-w /var/www/html/web/sites/default 130 sudo chmod a+w /var/www/html/web/sites/default 131 sudo chmod go-w /var/www/html/web/sites/default 133 ip address 135 sudo apt-get install openssh-server 136 sudo service ssh restart 138 sudo a2ensite wordpress 139 sudo systemctl reload apache2 140 sudo nano /etc/wordpress/config-localhost.php 141 sudo systemctl reload apache2 142 sudo nano /etc/wordpress/config-localhost.php 143 sudo nano /etc/apache2/sites-available/wordpress.conf 144 sudo systemctl reload apache2 145 tcpcapture 146 sudo nano /etc/apache2/sites-available/wordpress.conf 147 sudo systemctl reload apache2 148 sudo nano /etc/apache2/sites-available/wordpress.conf 149 sudo systemctl reload apache2 150 sudo nano /etc/apache2/sites-available/wordpress.conf 151 sudo nano /etc/wordpress/config-localhost.php 152 sudo nano /etc/apache2/ports.conf 153 sudo systemctl reload apache2 154 sudo nano /etc/apache2/sites-available/wordpress.conf 155 sudo systemctl reload apache2 156 sudo nano /usr/share/wordpress/wp-config.php 157 sudo nano /etc/wordpress/config-localhost.php 158 sudo systemctl reload apache2 159 sudo nano /etc/wordpress/config-3.3.3.3.php 160 sudo systemctl reload apache2 161 mysql -u 'a'@'3.3.3.3'root -p 162 mysql -u 'a'@'3.3.3.3' -p 163 mysql -u a@3.3.3.3 -p 164 sudo nano /etc/wordpress/config-3.3.3.3.php 165 sudo nano /usr/share/wordpress/wp-config.php 166 sudo nano /etc/apache2/sites-available/wordpress.conf 167 sudo systemctl reload apache2 168 sudo nano /etc/apache2/sites-available/wordpress.conf 169 sudo systemctl reload apache2 170 sudo nano /etc/apache2/sites-available/wordpress.conf 171 sudo systemctl reload apache2 173 sudo apachectl configtest 174 sudo apt-get install wordpress 175 sudo apt-get install wordpress --reinstall 176 sudo a2ensite wordpress 177 sudo apachectl configtest 178 sudo systemctl reload apache2 179 gksu nautilus 180 sudo nano /etc/apache2/apache.conf 181 sudo netstat -a 182 sudo netstat -plnt 184 sudo ls /usr/wordpress 186 sudo ufw status 189 sudo nano /etc/vsftpd.conf 190 sudo netstat -plnt 191 sudo nano /etc/apache2/ports.conf 192 sudo netstat -plnt 193 sudo systemctl apache2 restart 196 sudo netstat -plnt 199 sudo nano /etc/vsftpd.conf 200 sudo netstat -plnt 202 sudo nano /etc/vsftpd.conf 203 sudo service vsftpd restart 204 sudo netstat -plnt 206 sudo apt-get update 207 sudo nano /etc/vsftpd.conf 208 sudo service vsftpd restart 209 sudo netstat -plnt 210 sudo ufw status 216 sudo nano /etc/vsftpd.conf 217 ftp -p localhost 218 sudo netstat -a 219 sudo nano /etc/vsftpd.conf 220 sudo service vsftpd restart 221 sudo netstat -plnt 225 sudo nano /etc/apache2/ports.conf 226 sudo netstat -plnt 229 sudo systemctl restart apache2 230 sudo netstat -plnt 231 service start vsftpd 232 service vsftpd start 233 sudo netstat -plnt 234 sudo apt-get purge vsftpd 235 audo apt-get update 236 sudo apt-get update 237 sudo apt-get install vsftpd 238 sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig 239 sudo nano /etc/vsftpd.conf 243 sudo nano /etc/vsftpd.conf 244 sudo service vsftpd restart 246 sudo netstat -plnt 247 sudo nano /etc/vsftpd.conf 248 sudo service vsftpd restart 249 sudo netstat -plnt 250 sudo ufw status 251 sudo nano /etc/vsftpd.conf 252 sudo service vsftpd restart 253 sudo netstat -plnt 254 systemctl status vsftpd 255 sudo nano /etc/vsftpd.conf 256 echo "a" | sudo tee -a /etc/vsftpd.userlist 257 sudo systemctl restart vsftpd 258 sudo netstat -plnt 260 sudo apt-get install nmap 261 ftp localhost 262 sudo nmap -PN 3.3.3.3 263 sudo nmap 3.3.3.3 264 sudo nmap 3.3.3.3 265 nslookup google.com 268 sudo systemctl reload apache2 269 a2enmod rewrite 270 sudo systemctl reload apache2 271 sudo ufc status 272 sudo ucf status 273 sudo ufw status 274 sudo systemctl reload apache2 275 sudo nano /var/www/html/index.php 276 sudo chmod a+w /var/www/html/index.php 277 sudo chown www-data:www-data /var/www/html/index.php 278 sudo systemctl reload apache2 279 sudo nano /var/www/html/index.html 280 su 282 sudo apt-get install searchmonkey 283 gksu searchmonkey 284 sudo apt-get upgrade 285 su 287 sudo systemctl 288 sudo systemctl |grep ftp 291 netstat | grep 2 292 telnet localhost Y 293 sudo restart vsftp 294 sudo systemctl restart vsftpd 295 sudo systemctl status vsfpd 296 sudo systemctl status vsftpd 297 telnet localhost Y 298 netstat | grep 2 299 telnet localhost 1132 300 sudo nano /etc/vsftpd.conf 301 sudo systemctl status vsftpd 302 sudo systemctl restart vsftpd 303 telnet localhost 1132 304 netstat | grep 1132 306 netstat | grep 1132 307 sudo nano /etc/vsftpd.conf 308 sudo systemctl restart vsftpd 309 netstat | grep 1132 310 netstat | inet 311 netstat | grep init 312 netstat | grep inet 313 telnet localhost 1132 316 netstat -a | grep ftp 317 netstat -a 318 netstat -l 319 systemctl list-unit-files 322 systemctl restart vsftpd 323 systemctl status vsftpd 324 netstat -a | grep 1132 325 systemctl restart vsftpd 326 systemctl status vsftpd 327 netstat -a | grep 1132 330 systemctl restart vsftpd 331 systemctl status vsftpd 332 netstat -a 347 systemctl status vsftpd 348 telnet localhost 1132 349 systemctl restart vsftpd 350 systemctl status vsftpd 351 telnet localhost 1132 352 sudo adduser a www-data 353 systemctl restart vsftpd 354 systemctl status vsftpd 355 cat vsftpd.service 356 systemctl cat vsftpd.service 358 cd Downloads 364 sudo apt install graphviz 366 systemd-analyze dot --order | dot -Tsvg > systemd-user.svg 367 systemctl restart vsftpd 368 systemctl daemon-reload vsftpd 369 systemctl daemon-reload 370 systemctl restart vsftpd 371 systemctl restart vsftpd_internal_#2 372 systemctl status vsftpd 373 systemctl status vsftpd_internal_#2 377 sudo ls /usr/share/wordpress 378 sudo chown www-data:www-data -R /usr/share/wordpress ====== Possible setup of new Ubuntu system ====== From: http://blog.wittchen.biz.pl/category/linux/ubuntu/ #!/bin/bash echo "downloading and installing useful software..." echo "installing zsh" sudo apt-get install zsh echo "installing oh-my-zsh" sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" echo "installing Git" sudo apt-get install git echo "Installing Java 7 and Java 8" sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get install oracle-java7-installer sudo apt-get install oracle-java8-installer echo "Setting Java 8 as default JVM" sudo apt-get install oracle-java8-set-default echo "installing font fix for Open JDK" sudo add-apt-repository ppa:no1wantdthisname/openjdk-fontfix sudo apt-get update sudo apt-get install openjdk-7-jdk sudo apt-get install openjdk-8-jdk echo "installing Gradle" sudo add-apt-repository ppa:cwchien/gradle sudo apt-get update sudo apt-get install gradle echo "Installing jayatana - HUD support for Swing applications" sudo add-apt-repository ppa:danjaredg/jayatana sudo apt-get update sudo apt-get install jayatana echo "installing Node.js" sudo apt-get install nodejs echo "installing Npm for Node.js" sudo apt-get install npm echo "installing Php 5" sudo apt-get install php5 echo "installing Go" sudo apt-get install golang echo "installing R" sudo apt-get install r-base echo "installing Pip for Python" sudo apt-get install python-pip echo "installing Chrome" sudo apt-get install libxss1 libappindicator1 libindicator7 wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome*.deb sudo rm google-chrome*.deb # removing installer package echo "installing Mutate" sudo add-apt-repository ppa:mutate/ppa sudo apt-get update sudo apt-get install mutate echo "installing Skype" sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" sudo apt-get update sudo apt-get install skype echo "installing Spotify" sudo sh -c 'echo "deb http://repository.spotify.com/ stable non-free" > /etc/apt/sources.list.d/spotify.list' sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59 sudo apt-get update sudo apt-get install spotify-client echo "installing Transmission (torrent client)" sudo apt-get install transmission echo "installing Gthumb - images browser and editor" sudo apt-get install gthumb echo "installing Pinta - image editor" sudo apt-get install pinta echo "installing VLC" sudo apt-get install vlc browser-plugin-vlc echo "installing Furious ISO Mount" sudo apt-get install furiusisomount echo "installing drivers for Logitech H760 Wireless Headset" sudo add-apt-repository ppa:ubuntu-audio-dev/ppa sudo apt-get update sudo apt-get dist-upgrade -y # installing indicators - begin echo "installing mutliload indicator" sudo add-apt-repository ppa:indicator-multiload/stable-daily sudo apt-get update sudo apt-get install indicator-multiload echo "installing sensors indicator" sudo add-apt-repository ppa:alexmurray/indicator-sensors sudo apt-get update sudo apt-get install indicator-sensors echo "installing my weather indicator" sudo add-apt-repository ppa:atareao/atareao sudo apt-get update sudo apt-get install my-weather-indicator # installing indicators - end # system optimization - begin echo "removing unwanted lenses from dashboard" sudo apt-get autoremove unity-lens-music unity-lens-photos unity-lens-gwibber unity-lens-shopping unity-lens-video echo "installing Compiz Config Settings Manager" sudo apt-get install compizconfig-settings-manager echo "remember to do the following things after installation of Compiz Config Settings Manager" echo "1. Disable Animations and Fading windows" echo "2. Set the Texture Filter to 'Fast'" echo "installing Preload" sudo apt-get install preload # system optimization - end echo "installing Dropbox" # should be done in the and, because we download stuff to ~ cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - #sudo apt-get install libappindicator1 # was installed earlier sudo apt-get install nautilus-dropbox