UBUNTU BASIC COMMANDS 1 Flashcards

1
Q

allows you to run programs or other commands with administrative privileges, just like “Run as administrator” in Windows.

A

sudo
(Super User DO)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It is used to install, update, upgrade and remove any package. apt get basically works on a database of available packages.

A

apt-get

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

This command updates the database and let your system know if there are newer packages available or not.

A

apt-get update

super user privileges is the first command you need to run in any Linux system after a fresh install.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

After updating the package database, next step is to to upgrade the installed packages.

A

apt-get upgrade

sudo apt-get upgrade < package-name >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

installs a desired package
(If you know the name of the package, then you can easily install a program using this command)

A

apt-get install

sudo apt-get install < package-name >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

removes the installed program.
-only removes the software from your system but not the configuration or data files of the package.

A

apt-get remove

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

is used when you want to remove a software completely from your system with its configuration or data files so that no longer personalized settings will be available during
reinstallation.

A

apt-get purge

sudo apt-get purge < package-name >

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

command is used to remove any unnecessary packages
- will remove those dependencies that were installed with applications and that are no longer used by anything
else on the system.

A

apt-get autoremove

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

lists all files and folders in your current working directory. You can also specify paths to other directories if you want to view their contents.

A

ls(list)

ls Documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • also known as chdir used to change the current working directory.
A

cd(change director)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Takes you to the root directory

A

cd /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Takes you up one directory level

A

cd ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Takes you to the previous directory

A

cd -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

displays the full pathname of the current working directory.

A

pwd(print working directory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

allows you to copy a file.
You should specify both the file you want to be copied and the location you want it copied to

A

cp(copy)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

allows you to move files.
You can also rename
files by moving them to the directory they are currently in, but under a new name.

A

mv(move)

17
Q

removes the specified file

A

rmdir(remove directory)

18
Q

allows you to create a new
directory. You can specify where you want the directory created,-if you do not do so, it will be created in your current working directory.

A

mkdir(make directory)

19
Q

This is a pager which is useful to view long files for instance:

A

less