With what command can you after pressing Alt + F2 open the terminal?
gnome-terminal
What are four main commands, often used?
man: view documentation
head: show first lines of file
tail: show last lines of file
cat: type out a file
What are the three basic elements of most input lines at shell prompts? What do they do?
How are options distinguished from arguments?
By starting with one or two dashes
i.e.
-p or –print
What are Virtual Terminals? (VT)
For what are Virtual Terminals useful?
How can a Virtual Terminal be accessed?
Ctrl + Alt + Function Key
(1-7)
7 -> graphical desktop
How can the graphical desktop be started/stopped?
Depends on the distro
Newer system-based distros use systemctl
like
sudo systemctl stop gdm or sudo telinit 3
restart it
sudo systemctl start gdm or sudo telinit 5
How can you log in and log out using the ssh command?
ssh student@remote-server.com
What happens when you run the shutdown command?
Which commands can be used to shutdown a machine?
How can you locate the folder of a command?
using which utility
Like
which diff
output: /usr/bin/diff
Alternatively, if which does not find it:
whereis diff
-> looks for packages in a broader range of system directories
Also locates source and man files packaged with the program
How can you see what you home directory is?
echo $HOME
What are four useful commands for directory navigation?
What does the command do:
pushd /folder
Changes the folder to target and adds it to history list, from where you came
What does the command do:
popd /folder
Puts you back in the history, created with pushd
Walking in reverse order, most recent directory will be the first one retrieved with popd)
How does an absolute Path start?
always with /
How are multiple / dealth with as a pathname?
valid but seen as only one /
How can you get a birds-eye view of a filesystem?
command:
tree -d
to see just directories and to suppress listing file names
What shortcut can clear a terminal?
Crtl + L
How can you view the sizes of filesystems?
df -h
What does the command do:
ls -li
How can you create a hard link to a file?
ln file1 file2
What is a hard link?