Difference between revisions of "Ubuntu"
m |
m |
||
Line 36: | Line 36: | ||
List installed packages | List installed packages | ||
<pre>apt list --installed</pre> | <pre>apt list --installed</pre> | ||
== PostgreSQL == | |||
Switch to postgres account | |||
<pre>sudo -i postgres</pre> | |||
Access PostgreSQL prompt | |||
<pre>psql</pre> | |||
Exit PostgreSQL prompt | |||
<pre>\q</pre> | |||
Log directly into PostgreSQL prompt with postgres user | |||
<pre>sudo -u postgres psql</pre> | |||
Add user (username must be same as PostgreSQL role and database) | |||
<pre>sudo adduser user_name</pre> | |||
Check current connection information | |||
<pre>\conninfo</pre> | |||
<b>While logged in as postgres user...</b> | |||
Create a new role. Use <code>man createuser</code> for more information. | |||
<pre>createuser --interactive</pre> | |||
Create new database | |||
<pre>createdb db_name</pre> | |||
Same user connect to different database | |||
<pre>psql -d postgres</pre> | |||
== Hardware == | == Hardware == |
Revision as of 22:01, 19 April 2018
Shell commands
Enable root account (not recommended):
$sudo passwd root
Disable root account you lock root account:
$sudo passwd -l root
Want to use root @ console:
$sudo -i
Windows Dual Boot page
Recovering Ubuntu After Windows Install
Grub2 on Ubuntu wiki
Grub2 GUI Customizer
For support-related question you can use Launchpad. You can also search the complete history of questions and answers.
Grub 2 basics
CLI Software Management
Synchronize package index from Internet. Location of repositories /etc/apt/sources.list
sudo apt-get update
Install newest versions of all software packages
sudo apt-get upgrade
Update distribution
sudo apt-get dist-upgrade
Install package (if already installed, will attempt to update package)
apt-get install package-name
List installed packages
apt list --installed
PostgreSQL
Switch to postgres account
sudo -i postgres
Access PostgreSQL prompt
psql
Exit PostgreSQL prompt
\q
Log directly into PostgreSQL prompt with postgres user
sudo -u postgres psql
Add user (username must be same as PostgreSQL role and database)
sudo adduser user_name
Check current connection information
\conninfo
While logged in as postgres user...
Create a new role. Use man createuser
for more information.
createuser --interactive
Create new database
createdb db_name
Same user connect to different database
psql -d postgres
Hardware
Identify video card:
paul@congo:~$ lspci -nn | grep VGA 01:00.0 VGA compatible controller [0300]: nVidia Corporation G92 [GeForce 8800 GT] [10de:0611] (rev a2)