GUI notes
Last time I looked, the DCU lab machines' GUI was as follows.
This may change over time.
Hopefully you will work it out.
We will not dwell on the GUI anyway. GUIs are easy to use.
GNOME on Ubuntu on the DCU lab PCs.
- The
GUI
used is
GNOME.
- There are many different GUIs.
What you see in the GUI here may not be the same on other Linux/Unix.
- LHS sidebar with Favourite applications, Recycle bin
- Settings in top RHS
- Boxes at bottom LHS - All applications
- Click "Activities" (or press Windows key) to get:
- Currently running applications
- Search box
- Keyboard shortcuts
- Keyboard shortcuts
on different OSes and GUIs
- Alt-Tab - switch between applications
- Windows key + L - lock
- Show desktop:
- Ctrl-Alt-D
(actually toggle raise/lower all windows)
- You can define your own shortcuts:
Settings - Keyboard - Shortcuts - Navigation
- RHS edge - may have multiple desktops
- Favourites list - Right click - Remove from Favourites
- All applications - Right click - Add to Favourites
- File Browser
- Top RHS
- Power
- Lock - Swipe up to unlock (on normal login)
GUI editors
- gedit
- right-click on file - open with gedit
- gedit file &
- launch any windowed app from command-line
- use
"&"
to detach app
or else command-line hangs until app exits
- saves backup files: file~
- has syntax highlighting
- touch file - make new file
- or just run gedit with new filename - if doesn't exist, gedit creates it
- "gedit" menu in top bar - Preferences
- Emacs
Command-line editors
- nano
nano shortcuts:
- Ctrl-W - Find
- Ctrl-K - Delete line
- Ctrl-A - Home
- Ctrl-E - End
- Ctrl-Y - PgUp
- Ctrl-V - PgDn
- Alt \ - Start of file
- Alt / - End of file
- Ctrl-O - Save
- Ctrl-X - Exit
- vi
- vim
vim commands:
Esc - menu
:w - save
:q - quit
More GUI
- File Browser
- dirs = directories (folders)
- [cryptic View icon] - Show Hidden Files
- Ctrl-L - edit address line directly
- More applications
- Take Screenshot
- Installing and updating applications on Linux is easy (if you have administrator rights):
- APT package management tool ("apt-get" command)
- Will need administrator rights to modify system directories.
(e.g. Install Linux on your laptop and try it.)
- winget
Package Manager for Windows 10 up.
Can use "winget" on the Windows command line.
- Package managers
on different OSes.
- List of package managers
Terminal
- Terminal -
command line
- very powerful
- similar to all other Linux/UNIX
- Search for "GNOME Terminal" - Add to Favourites
- Increase font is Ctrl + which on your keyboard may translate to Ctrl Shift +
- Decrease font is Ctrl -
- Default shell here is
bash.
Other shells are installed.
- Unix shell
- List of Unix utilities
- Shell script
- In GNOME Terminal, if a URL appears in the text on the command-line,
you can right-click on it to open it in browser.
- Command-line keys:
- ls
- ls
- ls -l
- echo * (all normal, non-hidden files and dirs)
- ls -l *
(if dir, will display contents)
- ls -ld *
(if dir, display name not contents)
- hidden files
- ls -a
- ls -al
- echo .* (all hidden files)
- echo .* * (all files)
- ls -l .* (don't need -a if going to actually name the hidden files)
- ls -ld .*
- environment variables
- set
- set > file.txt
- env
- env | sort
- echo HOME - the string "HOME"
- echo $HOME - the global (environment) variable HOME
- PATH = list of dirs searched
for command when you type a command,
separated by colons (:)
- SHELL = shell we are using (default here is bash)
- Shared, multi-user, file system:
- current and parent dirs
- . (current dir)
- Example: When was the last change to the current dir:
ls -ld .
- .. (parent dir)
- cd
- go home: cd
- go up to parent dir: cd ..
- go back to last dir: cd -
- command history
- up/down arrows
- history
- h (alias)
- !n - repeat command n
- !string - repeat last command that began with string
- !c - repeat last command that began with character c
- !! - last command
To see your disk quota, type:
quota -s
- quota manual page
-
Last we checked:
You have 2 G disk quota.
If you get "Disk quota exceeded"
- You need to delete some files.
-
To see which dirs are taking up room:
du | sort -n
-
There is now a DCU script to help you delete unneeded files. Type:
purge-junk-files
For testing manipulation of data with Linux commands,
it helps if we have some data to manipulate.
So I have installed the works of Shakespeare
to use for testing.
Core information you need
More on the Shakespeare files
- Source:
- I downloaded this copy of the
works of Shakespeare
from the free
eBooks site at the University of Adelaide.
- This has now closed. There are old copies in the Internet Archive at:
- Web pages not on the web:
- How can you see these files?
-
I am sharing these through the shared file system.
Permissions need to be something like:
- drwx--x--x /users/tutors/mhumphrysdculab
- drwxr-xr-x /users/tutors/mhumphrysdculab/share
These
Shakespeare files use
relative HTML links, not
absolute HTML links,
so can download to any location and the links still work ok.