Skip to content

Instantly share code, notes, and snippets.

@bablukpik
Last active February 12, 2019 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bablukpik/68c9ff7b63be496eb5000cd969f95605 to your computer and use it in GitHub Desktop.
Save bablukpik/68c9ff7b63be496eb5000cd969f95605 to your computer and use it in GitHub Desktop.
What is Sheel?
-> Shell is a UNIX term for the interactive user interface with an operating system. The shell is the layer of programming that understands and executes the commands a user enters. In some systems, the shell is called a command interpreter.
-> Simply put, the shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix computer. Nowadays, we have graphical user interfaces (GUIs) in addition to command line interfaces (CLIs) such as the shell.
On most Linux systems a program called bash (which stands for Bourne Again SHell, an enhanced version of the original Bourne shell program, sh, written by Steve Bourne) acts as the shell program. There are several additional shell programs available on a typical Linux system. These include: ksh, tcsh and zsh.
-> Another text window for a Unix shell is partially visible. In computing, a shell is a user interface for access to an operating system's services. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer's role and particular operatio
//User's File Access Permissions:
chmod - change/modify file access rights
su - temporarily become the superuser
chown - change file ownership
chgrp - change a file's group ownership
//Some Usefull Commands:
ls list files and directories
ls -a list all files and directories
mkdir make a directory
cd directory change to named directory
cd change to home-directory
cd ~ change to home-directory
cd .. change to parent directory
pwd display the path of the current directory
http://linuxcommand.org/lts0070.php
//Apache2 Rewrite Engine on command
$ sudo a2enmod rewrite
$ sudo /etc/init.d/apache2 restart
//Internal Server Error - htaccess
Ans: The Header directive is in the mod_headers apache module. You need to make sure that module is loaded into the apache server.
Steps to enable HEADERS modules:
Firstly check
cd /etc/apache2/mods-available
Install mod_headers:
sudo a2enmod headers
service apache2 restart
//To check Apache2 Error Log
/var/log/apache2/error.log
or
/var/log/httpd/error.log
//Mysql client and server
mysql is client
mysqld is the server
//Uninstalling mysql-server
sudo apt-get purge mysql-server
sudo apt-get autoremove
sudo apt-get autoclean
Re-Installing:
sudo apt-get update
sudo apt-get install mysql-server
//Error: phpmyadmin - count(): Parameter must be an array or an object that implements Countable
Ans:
Easiest Method:
sudo sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php
Manual Method:
Edit file /usr/share/phpmyadmin/libraries/sql.lib.php:
sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php
Replace: count($analyzed_sql_results['select_expr'] == 1)
With: (count($analyzed_sql_results['select_expr']) == 1)
Then restart the server:
sudo service apache2 restart
//Restart Mysql server
sudo service mysql restart
OR
For mysqld you may have to change the command accordingly or try this:
sudo /etc/init.d/mysql restart
For Host in Linux/Mac:
Open /etc/hosts file. (go to terminal and type: sudo nano /etc/hosts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment