└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Linux-Commands 2 | Important commands for solving some problems 3 | 4 | 5 | ## Install Flat Remix Gnome 6 | 7 | ``` 8 | sudo add-apt-repository ppa:daniruiz/flat-remix 9 | ``` 10 | 11 | ``` 12 | sudo apt update 13 | ``` 14 | 15 | ``` 16 | sudo apt install flat-remix-gnome 17 | ``` 18 | 19 | ## Install Flat Remix Icon Theme 20 | 21 | ``` 22 | sudo add-apt-repository ppa:daniruiz/flat-remix 23 | ``` 24 | 25 | ``` 26 | sudo apt update 27 | ``` 28 | 29 | ``` 30 | sudo apt install flat-remix 31 | ``` 32 | 33 | ## Install Flat Remix GTK Theme 34 | 35 | ``` 36 | sudo add-apt-repository ppa:daniruiz/flat-remix 37 | ``` 38 | 39 | ``` 40 | sudo apt update 41 | ``` 42 | 43 | ``` 44 | sudo apt install flat-remix-gtk 45 | 46 | ``` 47 | 48 | ## Convert extension of files 49 | 50 | install `unoconv` 51 | 52 | ``` 53 | sudo apt install unoconv 54 | ``` 55 | 56 | Dont't forget to put the format you want to convert to instead of `` and put your file name and it's extension instead of `file_name.extension` 57 | 58 | ``` 59 | unoconve -f 'file_name.extension' 60 | ``` 61 | 62 | Example: 63 | 64 | ``` 65 | unoconv -f pdf 'Chapter 1.docx' 66 | ``` 67 | 68 | If you want to convert number of files together you can put them in folder together and use this command after open your folder in terminal 69 | 70 | ``` 71 | unoconv -f *.file_extension 72 | ``` 73 | 74 | Example: 75 | 76 | ``` 77 | unoconv -f pdf *.pptx 78 | ``` 79 | 80 | **Convert files to pdf** 81 | 82 | ``` 83 | soffice --headless --convert-to pdf 'file_name.extension' 84 | ``` 85 | 86 | ## Coonvert Multiple files and merge them into pdf 87 | 88 | **First install Image Magick** 89 | 90 | ``` 91 | sudo apt install imagemagick 92 | ``` 93 | 94 | ### Solving the Security Policy Error 95 | 96 | ``` 97 | sudo nano /etc/ImageMagick-6/policy.xml 98 | ``` 99 | 100 | **Find and edit the line:** 101 | 102 | ``` 103 | 104 | ``` 105 | 106 | **to:** 107 | 108 | ``` 109 | 110 | ``` 111 | 112 | **To convert use the following command after open the folder in the terminal:** 113 | 114 | ``` 115 | convert 'file_1.extension' 'file_1.extension' 'file_1.extension' 'pdf_name.pdf' 116 | ``` 117 | 118 | **Example:** 119 | 120 | ``` 121 | convert image1.jpg image2.png image3.bmp output.pdf 122 | ``` 123 | 124 | ## Fix Black Screen in screen sharing 125 | 126 | Open your terminal 127 | 128 | ``` 129 | sudoedit /etc/gdm3/custom.conf 130 | ``` 131 | 132 | remove `#` from `WaylandEnable=false` 133 | 134 | ``` 135 | sudo systemctl restart gdm3 136 | ``` 137 | 138 | ## Permissions for NTFS partition 139 | 140 | Got to `Disks` and unmounted the partition 141 | To fix this. 142 | 143 | ``` 144 | sudo ntfsfix /dev/[DRIVE_MACHINE_NAME-FOR-PARTITION] 145 | ``` 146 | 147 | Example: 148 | 149 | ``` 150 | sudo ntfsfix /dev/sda1 151 | ``` 152 | 153 | ## Shutdown Computer at Specific Time 154 | 155 | **Sometimes you will need to shutdown your computer some hours after your work hours have ended. You can configure your computer to shut down at specific time by using:** 156 | 157 | ``` 158 | sudo shutdown 21:00 159 | ``` 160 | 161 | **This will tell your computer to shut down at the specific time you have provided. You can also tell the system to shutdown after specific amount of minutes:** 162 | 163 | ``` 164 | sudo shutdown +15 165 | ``` 166 | 167 | **To cancel a previous shutdown call, you can use the -c flag:** 168 | 169 | ``` 170 | shutdown -c 171 | ``` 172 | 173 | ## Using yes command for commands or scripts that need interactive response 174 | 175 | **If there are some commands or scripts that need user interaction and you know that you have to enter Y each time it requires an input, you can use Yes command.** 176 | 177 | ``` 178 | yes | command_or_script 179 | ``` 180 | 181 | ## Make file executable 182 | 183 | The chmod command lets you change the mode of a file (permissions) quickly. It has a lot of options available with it. 184 | 185 | The basic permissions a file can have are: 186 | 187 | r (read) 188 | w (write) 189 | x (execute) 190 | One of the most common use cases for chmod is to make a file executable by the user. To do this, type chmod and the flag +x, followed by the file you want to modify permissions on: 191 | 192 | ``` 193 | chmod +x 'file name' 194 | ``` 195 | 196 | ## Displays information about your system 197 | 198 | ``` 199 | sudo apt install neofetch 200 | ``` 201 | 202 | ``` 203 | neofetch 204 | ``` 205 | 206 | ## Make snap programs appears in programs list 207 | 208 | ``` 209 | export XDG_DATA_DIRS="$XDG_DATA_DIRS:/var/lib/snapd/desktop/"` 210 | ``` 211 | --------------------------------------------------------------------------------